rapacious commited on
Commit
f7c9c71
·
verified ·
1 Parent(s): 54dbd2f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,15 +1,15 @@
1
  import gradio as gr
2
  import requests
3
 
4
- def chat_with_llama(prompt):
5
  response = requests.post("http://localhost:8000/completion", json={"prompt": prompt, "max_tokens": 100})
6
  return response.json().get("text", "Không có phản hồi từ server.")
7
 
8
  iface = gr.Interface(
9
- fn=chat_with_llama,
10
  inputs="text",
11
  outputs="text",
12
- title="LLaMA Chatbot trên Hugging Face Space"
13
  )
14
 
15
  iface.launch(server_name="0.0.0.0", server_port=7860)
 
1
  import gradio as gr
2
  import requests
3
 
4
+ def chat_with_qwen(prompt):
5
  response = requests.post("http://localhost:8000/completion", json={"prompt": prompt, "max_tokens": 100})
6
  return response.json().get("text", "Không có phản hồi từ server.")
7
 
8
  iface = gr.Interface(
9
+ fn=chat_with_qwen,
10
  inputs="text",
11
  outputs="text",
12
+ title="Qwen2.5-0.5B Chatbot trên Hugging Face Space"
13
  )
14
 
15
  iface.launch(server_name="0.0.0.0", server_port=7860)