rwayz commited on
Commit
26425fc
verified
1 Parent(s): 7de1329

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -10,10 +10,10 @@ client = InferenceClient(
10
  api_key=HF_TOKEN,
11
  )
12
 
13
- # Modelos dispon铆veis
14
  MODELS = {
15
  "LLaMA 70B": "meta-llama/Llama-3.3-70B-Instruct",
16
- "Qwen 32B": "Qwen/QwQ-32B"
 
17
  }
18
 
19
  history_log = []
@@ -55,15 +55,14 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
55
  label="Escolha o Modelo",
56
  value="LLaMA 70B"
57
  )
58
- history_btn = gr.Button("Ver/Fechar Hist贸rico", variant="secondary")
59
- history_output = gr.JSON()
60
  with gr.Column(scale=4):
61
- gr.Markdown("# 馃 Chatbot - SambaNova")
62
  chatbot = gr.Chatbot(height=500)
63
  msg = gr.Textbox(placeholder="Digite sua mensagem aqui...", show_label=False)
64
  with gr.Row():
65
  btn = gr.Button("Enviar", variant="primary")
66
- history_btn = gr.Button("Ver/Fechar Hist贸rico", variant="secondary")
67
 
68
  history_output = gr.JSON()
69
 
@@ -73,7 +72,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
73
  return "", chat_history
74
 
75
  btn.click(respond, [msg, chatbot, model_selector], [msg, chatbot])
76
- msg.submit(respond, [msg, chatbot, model_selector], [msg, chatbot]) # permite envio com Enter
77
 
78
  def toggle_history():
79
  global show_history_flag
 
10
  api_key=HF_TOKEN,
11
  )
12
 
 
13
  MODELS = {
14
  "LLaMA 70B": "meta-llama/Llama-3.3-70B-Instruct",
15
+ "Qwen 32B": "Qwen/QwQ-32B",
16
+ "DeepSeek R1":"deepseek-ai/DeepSeek-R1",
17
  }
18
 
19
  history_log = []
 
55
  label="Escolha o Modelo",
56
  value="LLaMA 70B"
57
  )
58
+
 
59
  with gr.Column(scale=4):
60
+ gr.Markdown("# 馃 Chatbot - API SambaNova")
61
  chatbot = gr.Chatbot(height=500)
62
  msg = gr.Textbox(placeholder="Digite sua mensagem aqui...", show_label=False)
63
  with gr.Row():
64
  btn = gr.Button("Enviar", variant="primary")
65
+ history_btn = gr.Button("Hist贸rico", variant="secondary")
66
 
67
  history_output = gr.JSON()
68
 
 
72
  return "", chat_history
73
 
74
  btn.click(respond, [msg, chatbot, model_selector], [msg, chatbot])
75
+ msg.submit(respond, [msg, chatbot, model_selector], [msg, chatbot])
76
 
77
  def toggle_history():
78
  global show_history_flag