jatin-tec commited on
Commit
8faabac
·
1 Parent(s): eff9880
Files changed (1) hide show
  1. main.py +6 -7
main.py CHANGED
@@ -39,13 +39,12 @@ def sentence_builder(age, sex, skin_type, allergies, diet, file):
39
  data['diet'] = diet
40
 
41
 
42
- # try:
43
- response = index.recommendation(data)
44
- print(response)
45
- content = response['choices'][0]['message']['content']
46
- return content, output1, output2, output3, output4
47
- # except:
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.")