Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -112,17 +112,19 @@ def generate_image():
|
|
112 |
|
113 |
# Get the path to the current file's directory
|
114 |
current_dir = os.path.dirname(os.path.abspath(__file__))
|
115 |
-
file_path = os.path.join(current_dir, 'workflows/
|
116 |
|
117 |
with open(file_path, 'r', encoding='utf-8') as file:
|
118 |
workflow_jsondata = file.read()
|
119 |
|
120 |
prompt = json.loads(workflow_jsondata)
|
121 |
prompt["6"]["inputs"]["text"] = text_prompt
|
122 |
-
|
|
|
123 |
|
124 |
seednum = random.randint(1, 9999999999999)
|
125 |
-
|
|
|
126 |
|
127 |
ws = websocket.WebSocket()
|
128 |
ws.connect(f"{ws_address}?clientId={client_id}&token={token}")
|
|
|
112 |
|
113 |
# Get the path to the current file's directory
|
114 |
current_dir = os.path.dirname(os.path.abspath(__file__))
|
115 |
+
file_path = os.path.join(current_dir, 'workflows/flux1_dev_checkpoint_workflow_api.json')
|
116 |
|
117 |
with open(file_path, 'r', encoding='utf-8') as file:
|
118 |
workflow_jsondata = file.read()
|
119 |
|
120 |
prompt = json.loads(workflow_jsondata)
|
121 |
prompt["6"]["inputs"]["text"] = text_prompt
|
122 |
+
|
123 |
+
# prompt["7"]["inputs"]["text"] = "text, watermark, low quality, extra hands, extra legs."
|
124 |
|
125 |
seednum = random.randint(1, 9999999999999)
|
126 |
+
|
127 |
+
# prompt["3"]["inputs"]["seed"] = seednum
|
128 |
|
129 |
ws = websocket.WebSocket()
|
130 |
ws.connect(f"{ws_address}?clientId={client_id}&token={token}")
|