Code4ueru commited on
Commit
af65359
·
verified ·
1 Parent(s): 534af3f

Changed debugging to true and added comments

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -3,6 +3,7 @@ import random
3
  from huggingface_hub import InferenceClient
4
 
5
  client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
 
6
 
7
  def respond(message, history):
8
 
@@ -12,8 +13,12 @@ def respond(message, history):
12
 
13
  messages.append({"role" : "user", "content" : message})
14
 
15
- response = client.chat_completion(messages, max_tokens = 100)
16
-
 
 
 
 
17
  print(response["choices"][0]["message"]["content"].strip())
18
 
19
 
@@ -26,4 +31,4 @@ def random_message(message, history):
26
 
27
  chatbot = gr.ChatInterface(respond, type = "messages", description = "<strong><center>Don't talk to me please.</strong><br>go away.", title = "I'm not a chatbot")
28
 
29
- chatbot.launch()
 
3
  from huggingface_hub import InferenceClient
4
 
5
  client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
6
+ # change LLM ^
7
 
8
  def respond(message, history):
9
 
 
13
 
14
  messages.append({"role" : "user", "content" : message})
15
 
16
+ response = client.chat_completion(
17
+ messages,
18
+ max_tokens = 100
19
+ #change the length
20
+ )
21
+
22
  print(response["choices"][0]["message"]["content"].strip())
23
 
24
 
 
31
 
32
  chatbot = gr.ChatInterface(respond, type = "messages", description = "<strong><center>Don't talk to me please.</strong><br>go away.", title = "I'm not a chatbot")
33
 
34
+ chatbot.launch(debug=True)