Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -70,9 +70,9 @@ def image_edition(text):
|
|
70 |
try:
|
71 |
# Call the DeepAI Image Editor API
|
72 |
url = "https://api.deepai.org/api/image-editor"
|
73 |
-
|
74 |
files = {
|
75 |
-
'image': open('
|
76 |
'text': text
|
77 |
}
|
78 |
response = requests.post(url, headers=headers, files=files)
|
|
|
70 |
try:
|
71 |
# Call the DeepAI Image Editor API
|
72 |
url = "https://api.deepai.org/api/image-editor"
|
73 |
+
headers = {'api-key': api_key}
|
74 |
files = {
|
75 |
+
'image': open('TAI_Images/TerraIncognita3.jpg', 'rb'), # Replace 'path_to_your_image.jpg' with the actual path to your image file
|
76 |
'text': text
|
77 |
}
|
78 |
response = requests.post(url, headers=headers, files=files)
|