repd79 commited on
Commit
492bec3
·
verified ·
1 Parent(s): 331e0eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -14
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.ChatInterface(
42
- respond,
43
- additional_inputs=[
44
- gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
45
- gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
46
- gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
47
- gr.Slider(
48
- minimum=0.1,
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()