Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
@@ -8,9 +8,8 @@ app = Flask(__name__)
|
|
8 |
|
9 |
# Função para chamar a API de hospedagem de imagens
|
10 |
def host_image(endpoint, image_path):
|
11 |
-
api_url = "https://wosocial.bubbleapps.io/version-test/api/1.1/wf/save"
|
12 |
-
|
13 |
-
files = {'file': open(image_url, 'rb')}
|
14 |
response = requests.post(api_url, files=files)
|
15 |
if response.status_code == 200:
|
16 |
return response.json()["response"]["result"]
|
|
|
8 |
|
9 |
# Função para chamar a API de hospedagem de imagens
|
10 |
def host_image(endpoint, image_path):
|
11 |
+
api_url = "https://wosocial.bubbleapps.io/version-test/api/1.1/wf/save?file="
|
12 |
+
img_url = f"{endpoint}/file={result_path}"
|
|
|
13 |
response = requests.post(api_url, files=files)
|
14 |
if response.status_code == 200:
|
15 |
return response.json()["response"]["result"]
|