Antonio49 commited on
Commit
4c17f86
·
verified ·
1 Parent(s): 6616892

Create space.py

Browse files
Files changed (1) hide show
  1. space.py +15 -0
space.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import time
3
+
4
+ def slow_echo(message, history):
5
+ for i in range(len(message)):
6
+ time.sleep(0.05)
7
+ yield "Tu escribiste: " + message[: i+1]
8
+
9
+ demo = gr.ChatInterface(slow_echo,
10
+ title="Chat básico",
11
+ description= 'Autor: <a href=\"https://huggingface.co/Antonio49\">Antonio Fernández</a> de <a href=\"https://saturdays.ai/\">SaturdaysAI</a>. Formación: <a href=\"https://cursos.saturdays.ai/courses/\">Cursos Online AI</a> Aplicación desarrollada con fines docentes'
12
+ ).queue()
13
+
14
+ if __name__ == "__main__":
15
+ demo.launch()