ssundus commited on
Commit
a476719
·
verified ·
1 Parent(s): 0a87c7f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -8,8 +8,8 @@ client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
8
 
9
 
10
  def respond(message, history):
11
- #responses = ["Yes", "No"]
12
- #return random.choice(responses)
13
 
14
 
15
  messages = [
@@ -23,7 +23,7 @@ def respond(message, history):
23
  response = client.chat_completion(
24
  messages, max_tokens = 100
25
  )
26
- return response['choices'] [0] ['message']['content'].strip()
27
 
28
  chatbot = gr.ChatInterface(respond, type="messages")
29
  chatbot.launch()
 
8
 
9
 
10
  def respond(message, history):
11
+ # responses = ["Yes", "No"]
12
+ # return random.choice(responses)
13
 
14
 
15
  messages = [
 
23
  response = client.chat_completion(
24
  messages, max_tokens = 100
25
  )
26
+ return response['choices'][0]['message']['content'].strip()
27
 
28
  chatbot = gr.ChatInterface(respond, type="messages")
29
  chatbot.launch()