Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -65,7 +65,7 @@ def generate_image(api_key, text):
|
|
| 65 |
headers = {'api-key': api_key}
|
| 66 |
response = requests.post(
|
| 67 |
url,
|
| 68 |
-
data={'text': text, 'width':
|
| 69 |
headers=headers
|
| 70 |
)
|
| 71 |
response_data = response.json()
|
|
@@ -81,7 +81,7 @@ def generate_image(api_key, text):
|
|
| 81 |
def get_predictions(audio_input):
|
| 82 |
emotion_prediction = predict_emotion_from_audio(audio_input)
|
| 83 |
transcribed_text = transcribe(audio_input)
|
| 84 |
-
texto_imagen = "Generate
|
| 85 |
image = generate_image(api_key, texto_imagen)
|
| 86 |
return emotion_prediction, transcribed_text, image
|
| 87 |
|
|
|
|
| 65 |
headers = {'api-key': api_key}
|
| 66 |
response = requests.post(
|
| 67 |
url,
|
| 68 |
+
data={'text': text, 'width': 1200, 'height': 600, 'image_generator_version': 'hd' },
|
| 69 |
headers=headers
|
| 70 |
)
|
| 71 |
response_data = response.json()
|
|
|
|
| 81 |
def get_predictions(audio_input):
|
| 82 |
emotion_prediction = predict_emotion_from_audio(audio_input)
|
| 83 |
transcribed_text = transcribe(audio_input)
|
| 84 |
+
texto_imagen = "Generate an equirectangular texture image' representing the concept of: [ " + emotion_prediction + "]ness. Illustrate this idea using a " + emotion_prediction + " graphic style."
|
| 85 |
image = generate_image(api_key, texto_imagen)
|
| 86 |
return emotion_prediction, transcribed_text, image
|
| 87 |
|