Update app.py
Browse files
app.py
CHANGED
@@ -38,22 +38,19 @@ def respond(
|
|
38 |
"""
|
39 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
40 |
"""
|
41 |
-
demo = gr.
|
42 |
-
respond,
|
43 |
-
|
44 |
-
gr.Textbox(value="
|
45 |
-
gr.
|
46 |
-
gr.Slider(minimum=
|
47 |
-
gr.Slider(
|
48 |
-
|
49 |
-
maximum=1.0,
|
50 |
-
value=0.95,
|
51 |
-
step=0.05,
|
52 |
-
label="Top-p (nucleus sampling)",
|
53 |
-
),
|
54 |
],
|
|
|
|
|
|
|
55 |
)
|
56 |
|
57 |
-
|
58 |
if __name__ == "__main__":
|
59 |
demo.launch()
|
|
|
38 |
"""
|
39 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
40 |
"""
|
41 |
+
demo = gr.Interface(
|
42 |
+
fn=respond,
|
43 |
+
inputs=[
|
44 |
+
gr.Textbox(value="Eres un chatbot muy amigable.", label="Mensaje del sistema"),
|
45 |
+
gr.Chatbot(),
|
46 |
+
gr.Slider(minimum=1, maximum=1024, value=512, step=1, label="Max new tokens"),
|
47 |
+
gr.Slider(minimum=0.1, maximum=1.0, value=0.7, step=0.1, label="Temperature"),
|
48 |
+
gr.Slider(minimum=0.1, maximum=1.0, value=0.9, step=0.05, label="Top-p"),
|
|
|
|
|
|
|
|
|
|
|
49 |
],
|
50 |
+
outputs="text",
|
51 |
+
title="ALIA-40b Generador de Texto",
|
52 |
+
description="Introduce un texto y deja que el modelo ALIA-40b complete la respuesta.",
|
53 |
)
|
54 |
|
|
|
55 |
if __name__ == "__main__":
|
56 |
demo.launch()
|