arohi-k commited on
Commit
5eec524
·
verified ·
1 Parent(s): e226838

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -22,15 +22,15 @@ def respond(message, history):
22
  # temp = between 0-2
23
  # top-p = between 0-1
24
  ):
25
- token = messages.choices[0].delta.content
26
  if token:
27
  response += token
28
  yield response
29
 
30
- #def random_message(message, history):
31
- #choices = ["it is likely", "absolutely not", "try again", "without a doubt", "outlook good", "signs point to it", "very unlikely", "quite doubtful"]
32
- #chat_answer = random.choice(choices)
33
- #return chat_answer
34
 
35
  chatbot = gr.ChatInterface(respond, type = "messages")
36
 
 
22
  # temp = between 0-2
23
  # top-p = between 0-1
24
  ):
25
+ token = message.choices[0].delta.content
26
  if token:
27
  response += token
28
  yield response
29
 
30
+ def random_message(message, history):
31
+ choices = ["it is likely", "absolutely not", "try again", "without a doubt", "outlook good", "signs point to it", "very unlikely", "quite doubtful"]
32
+ chat_answer = random.choice(choices)
33
+ return chat_answer
34
 
35
  chatbot = gr.ChatInterface(respond, type = "messages")
36