Update app.py
Browse files
app.py
CHANGED
|
@@ -54,13 +54,13 @@ def get_predictions(audio_input):
|
|
| 54 |
###
|
| 55 |
|
| 56 |
# Define a function to generate an image using DeepAI Text to Image API
|
| 57 |
-
def generate_image(api_key,
|
| 58 |
url = "https://api.deepai.org/api/text2img"
|
| 59 |
headers = {'api-key': api_key}
|
| 60 |
response = requests.post(
|
| 61 |
url,
|
| 62 |
data={
|
| 63 |
-
'text':
|
| 64 |
},
|
| 65 |
headers=headers
|
| 66 |
)
|
|
|
|
| 54 |
###
|
| 55 |
|
| 56 |
# Define a function to generate an image using DeepAI Text to Image API
|
| 57 |
+
def generate_image(api_key, emotion_prediction):
|
| 58 |
url = "https://api.deepai.org/api/text2img"
|
| 59 |
headers = {'api-key': api_key}
|
| 60 |
response = requests.post(
|
| 61 |
url,
|
| 62 |
data={
|
| 63 |
+
'text': emotion_prediction,
|
| 64 |
},
|
| 65 |
headers=headers
|
| 66 |
)
|