Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -54,25 +54,24 @@ def chatbot_response(user_input, model_name):
|
|
54 |
return response
|
55 |
|
56 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
57 |
-
with gr.
|
58 |
-
with gr.
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
-
|
68 |
-
gr.Markdown("# 馃 Chatbot - API SambaNova")
|
69 |
-
chatbot = gr.Chatbot(height=500)
|
70 |
-
msg = gr.Textbox(placeholder="Digite sua mensagem aqui...", show_label=False)
|
71 |
-
with gr.Row():
|
72 |
-
btn = gr.Button("Enviar", variant="primary")
|
73 |
-
history_btn = gr.Button("Hist贸rico", variant="secondary")
|
74 |
-
|
75 |
-
history_output = gr.JSON()
|
76 |
|
77 |
def respond(message, chat_history, model_name):
|
78 |
response = chatbot_response(message, model_name)
|
|
|
54 |
return response
|
55 |
|
56 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
57 |
+
with gr.Row():
|
58 |
+
with gr.Column(scale=1, min_width=300):
|
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=3, min_width=300):
|
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)
|