cindyy3 commited on
Commit
64ce67e
1 Parent(s): 2212ab6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1,6 +1,7 @@
1
  import gradio as gr
2
  from sentence_transformers import SentenceTransformer, util
3
  import openai
 
4
  import os
5
 
6
  os.environ["TOKENIZERS_PARALLELISM"] = "false"
@@ -650,7 +651,8 @@ def generate_recommendation(criteria):
650
  f"Visit their website for more details: {result['website']}"
651
  )
652
  recommendations.append(recommendation)
653
- return "\n".join(recommendations)
 
654
  else:
655
  return "Sorry, no restaurants meet your criteria. Please try adjusting your filters."
656
 
 
1
  import gradio as gr
2
  from sentence_transformers import SentenceTransformer, util
3
  import openai
4
+ import random
5
  import os
6
 
7
  os.environ["TOKENIZERS_PARALLELISM"] = "false"
 
651
  f"Visit their website for more details: {result['website']}"
652
  )
653
  recommendations.append(recommendation)
654
+ random_index = random.randint(0, len(recommendations) - 1)
655
+ return recommendations[random_index]
656
  else:
657
  return "Sorry, no restaurants meet your criteria. Please try adjusting your filters."
658