Naomi567 commited on
Commit
4aab119
·
verified ·
1 Parent(s): bee2caa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -4,7 +4,7 @@ from huggingface_hub import InferenceClient
4
 
5
  client = InferenceClient("google/gemma-3-27b-it") #change the LLM "HuggingFaceH4/zephyr-7b-beta"
6
 
7
- def respond(message, history):
8
 
9
  messages = [{"role": "system", "content": "Your name is Miles. You are the goofy nerd in highschool"}] # "content" is where u can change the personality
10
  if history:
@@ -34,17 +34,19 @@ def random_response(message, history):
34
  random.choice(responses)
35
  print(random_response)
36
 
37
- chatbot = gr.ChatInterface(respond,
 
 
38
  type = "messages",
39
  theme = gr.themes.Ocean(
40
  primary_hue="pink",
41
  secondary_hue="pink",
42
  neutral_hue="fuchsia",
43
  ),
44
- title = "Meet Milo!",
45
  description = "That nerdy boy from high school.",
46
- inputs=gr.Textbox(label="Ask me anything about KWK camp!"),
47
- outputs=gr.Textbox(label="KWK Bot says...")
48
  )
49
 
50
  chatbot.launch(debug=True)
 
4
 
5
  client = InferenceClient("google/gemma-3-27b-it") #change the LLM "HuggingFaceH4/zephyr-7b-beta"
6
 
7
+ def respond_miles(message, history):
8
 
9
  messages = [{"role": "system", "content": "Your name is Miles. You are the goofy nerd in highschool"}] # "content" is where u can change the personality
10
  if history:
 
34
  random.choice(responses)
35
  print(random_response)
36
 
37
+ chatbot = gr.ChatInterface(
38
+ fn=respond_miles,
39
+ respond,
40
  type = "messages",
41
  theme = gr.themes.Ocean(
42
  primary_hue="pink",
43
  secondary_hue="pink",
44
  neutral_hue="fuchsia",
45
  ),
46
+ title = "Meet Miles!",
47
  description = "That nerdy boy from high school.",
48
+ inputs=gr.Textbox(label="Ask me anything !"),
49
+ outputs=gr.Textbox(label="Miles says...")
50
  )
51
 
52
  chatbot.launch(debug=True)