Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -109,8 +109,13 @@ def generate_image():
|
|
109 |
return jsonify({'error': 'No text prompt provided'}), 400
|
110 |
|
111 |
text_prompt = data['text_prompt']
|
112 |
-
|
|
|
113 |
|
|
|
|
|
|
|
|
|
114 |
with open(file_path, 'r', encoding='utf-8') as file:
|
115 |
workflow_jsondata = file.read()
|
116 |
|
|
|
109 |
return jsonify({'error': 'No text prompt provided'}), 400
|
110 |
|
111 |
text_prompt = data['text_prompt']
|
112 |
+
|
113 |
+
# file_path = '/Users/muhammadwaqas/gosign/comfyui-api/workflow_api.json'
|
114 |
|
115 |
+
# Get the path to the current file's directory
|
116 |
+
current_dir = os.path.dirname(os.path.abspath(__file__))
|
117 |
+
file_path = os.path.join(current_dir, 'workflow_api.json')
|
118 |
+
|
119 |
with open(file_path, 'r', encoding='utf-8') as file:
|
120 |
workflow_jsondata = file.read()
|
121 |
|