Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -46,24 +46,24 @@ def respond(
|
|
46 |
|
47 |
chatbot = gr.Chatbot(height=600)
|
48 |
|
49 |
-
|
50 |
respond,
|
51 |
additional_inputs=[
|
52 |
-
gr.Textbox(value="", label="
|
53 |
-
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="
|
54 |
-
gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="
|
55 |
gr.Slider(
|
56 |
minimum=0.1,
|
57 |
maximum=1.0,
|
58 |
value=0.95,
|
59 |
step=0.05,
|
60 |
-
label="
|
61 |
),
|
62 |
|
63 |
],
|
64 |
fill_height=True,
|
65 |
chatbot=chatbot,
|
66 |
-
theme=
|
67 |
)
|
68 |
if __name__ == "__main__":
|
69 |
-
|
|
|
46 |
|
47 |
chatbot = gr.Chatbot(height=600)
|
48 |
|
49 |
+
service = gr.ChatInterface(
|
50 |
respond,
|
51 |
additional_inputs=[
|
52 |
+
gr.Textbox(value="", label="Системный промпт"),
|
53 |
+
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Максимальная длина ответа"),
|
54 |
+
gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Температура"),
|
55 |
gr.Slider(
|
56 |
minimum=0.1,
|
57 |
maximum=1.0,
|
58 |
value=0.95,
|
59 |
step=0.05,
|
60 |
+
label="top_p",
|
61 |
),
|
62 |
|
63 |
],
|
64 |
fill_height=True,
|
65 |
chatbot=chatbot,
|
66 |
+
theme=gr.themes.Soft(),
|
67 |
)
|
68 |
if __name__ == "__main__":
|
69 |
+
service.launch()
|