Spaces:
Sleeping
Sleeping
jatin-tec commited on
Commit ·
8faabac
1
Parent(s): eff9880
final
Browse files
main.py
CHANGED
|
@@ -39,13 +39,12 @@ def sentence_builder(age, sex, skin_type, allergies, diet, file):
|
|
| 39 |
data['diet'] = diet
|
| 40 |
|
| 41 |
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
# return "No recommendation found", output1, output2, output3, output4
|
| 49 |
|
| 50 |
with gr.Blocks() as demo:
|
| 51 |
gr.Markdown("Flip text or image files using this demo.")
|
|
|
|
| 39 |
data['diet'] = diet
|
| 40 |
|
| 41 |
|
| 42 |
+
try:
|
| 43 |
+
response = index.recommendation(data)
|
| 44 |
+
content = response['choices'][0]['message']['content']
|
| 45 |
+
return content, output1, output2, output3, output4
|
| 46 |
+
except:
|
| 47 |
+
return "No recommendation found", output1, output2, output3, output4
|
|
|
|
| 48 |
|
| 49 |
with gr.Blocks() as demo:
|
| 50 |
gr.Markdown("Flip text or image files using this demo.")
|