rwayz commited on
Commit
6638b93
verified
1 Parent(s): 0eee8b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -22
app.py CHANGED
@@ -55,30 +55,23 @@ def chatbot_response(user_input, model_name):
55
 
56
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
57
  with gr.Row():
58
- gr.Column(scale=0.5, min_width=40)
59
-
 
 
 
 
 
 
60
  with gr.Column(scale=4):
 
 
 
61
  with gr.Row():
62
- with gr.Column(scale=1):
63
- gr.Markdown("## 鈿欙笍 Configura莽玫es")
64
- model_selector = gr.Dropdown(
65
- choices=list(MODELS.keys()),
66
- label="Escolha o Modelo",
67
- value="LLaMA 70B"
68
- )
69
- with gr.Column(scale=4):
70
- gr.Markdown("# 馃 Chatbot - API SambaNova")
71
- chatbot = gr.Chatbot(height=500)
72
- msg = gr.Textbox(placeholder="Digite sua mensagem aqui...", label="")
73
- with gr.Row():
74
- btn = gr.Button("Enviar", variant="primary")
75
- history_btn = gr.Button("Hist贸rico", variant="secondary")
76
-
77
- with gr.Row():
78
- with gr.Column(scale=4):
79
- history_output = gr.JSON(visible=False)
80
-
81
- gr.Column(scale=0.5, min_width=40)
82
 
83
  def respond(message, chat_history, model_name):
84
  response = chatbot_response(message, model_name)
@@ -98,3 +91,4 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
98
 
99
  if __name__ == "__main__":
100
  demo.launch()
 
 
55
 
56
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
57
  with gr.Row():
58
+ with gr.Column(scale=1):
59
+ gr.Markdown("## 鈿欙笍 Configura莽玫es")
60
+ model_selector = gr.Dropdown(
61
+ choices=list(MODELS.keys()),
62
+ label="Escolha o Modelo",
63
+ value="LLaMA 70B"
64
+ )
65
+
66
  with gr.Column(scale=4):
67
+ gr.Markdown("# 馃 Chatbot - API SambaNova")
68
+ chatbot = gr.Chatbot(height=500)
69
+ msg = gr.Textbox(placeholder="Digite sua mensagem aqui...", show_label=False)
70
  with gr.Row():
71
+ btn = gr.Button("Enviar", variant="primary")
72
+ history_btn = gr.Button("Hist贸rico", variant="secondary")
73
+
74
+ history_output = gr.JSON()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
 
76
  def respond(message, chat_history, model_name):
77
  response = chatbot_response(message, model_name)
 
91
 
92
  if __name__ == "__main__":
93
  demo.launch()
94
+