KittyMona commited on
Commit
742aa8c
·
verified ·
1 Parent(s): 7410b55

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -1,11 +1,9 @@
1
- from huggingface_hub import InferenceClient
2
  import gradio as gr
 
3
 
4
  client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
5
 
6
- response_list = ["This why Marcus thinks you're annoying", "meow", "I see", "Bruh", "This is bummy"]
7
-
8
- def respond():
9
  messages = [{"role": "system", "content": "You are a friendly chatbot."}]
10
  if history:
11
  messages.extend(history)
@@ -16,6 +14,6 @@ def respond():
16
  )
17
  return response['choices'][0]['message']['content'].strip()
18
 
19
- chatbot = gr.ChatInterface(respond, type="messages", title="Lauren as a Robot")
20
 
21
  chatbot.launch()
 
 
1
  import gradio as gr
2
+ from huggingface_hub import InferenceClient
3
 
4
  client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
5
 
6
+ def respond(message, history):
 
 
7
  messages = [{"role": "system", "content": "You are a friendly chatbot."}]
8
  if history:
9
  messages.extend(history)
 
14
  )
15
  return response['choices'][0]['message']['content'].strip()
16
 
17
+ chatbot = gr.ChatInterface(respond, type="messages")
18
 
19
  chatbot.launch()