Spaces:
Runtime error
Runtime error
Update worker_runpod.py
Browse files- worker_runpod.py +2 -1
worker_runpod.py
CHANGED
@@ -211,7 +211,8 @@ def generate(input):
|
|
211 |
|
212 |
if response and response.status_code == 200:
|
213 |
try:
|
214 |
-
|
|
|
215 |
requests.post(f"{web_uri}/api/notify", data=json.dumps(payload), headers={'Content-Type': 'application/json', "authorization": f"{web_token}"})
|
216 |
except Exception as e:
|
217 |
print(f"An unexpected error occurred: {e}")
|
|
|
211 |
|
212 |
if response and response.status_code == 200:
|
213 |
try:
|
214 |
+
urls = [attachment['url'] for attachment in response.json()['attachments']]
|
215 |
+
payload = {"jobId": str(job_id), "result": str(urls)}
|
216 |
requests.post(f"{web_uri}/api/notify", data=json.dumps(payload), headers={'Content-Type': 'application/json', "authorization": f"{web_token}"})
|
217 |
except Exception as e:
|
218 |
print(f"An unexpected error occurred: {e}")
|