Hodely commited on
Commit
00a90c2
路
verified 路
1 Parent(s): 2edfd0d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -1,19 +1,19 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
- # Carga un modelo p煤blico y sin restricciones
5
- pipe = pipeline("text-generation", model="openchat/openchat-3.5-1210", device=-1)
6
 
7
  def responder(prompt):
8
- respuesta = pipe(prompt, max_new_tokens=300, do_sample=True, temperature=0.7)[0]['generated_text']
9
  return respuesta
10
 
11
  demo = gr.Interface(
12
- fn=responder,
13
- inputs=gr.Textbox(label="Escribe tu mensaje"),
14
  outputs=gr.Textbox(label="Respuesta"),
15
  title="馃 AmInside 1.0",
16
- description="Tu asistente IA gratuito conectado a un Space"
17
  )
18
 
19
  demo.launch()
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
+ # Modelo peque帽o, r谩pido y p煤blico
5
+ pipe = pipeline("text-generation", model="tiiuae/falcon-rw-1b", device=-1)
6
 
7
  def responder(prompt):
8
+ respuesta = pipe(prompt, max_new_tokens=100, do_sample=True, temperature=0.7)[0]['generated_text']
9
  return respuesta
10
 
11
  demo = gr.Interface(
12
+ fn=responder,
13
+ inputs=gr.Textbox(label="Escribe tu mensaje"),
14
  outputs=gr.Textbox(label="Respuesta"),
15
  title="馃 AmInside 1.0",
16
+ description="Versi贸n ligera en CPU, 100% gratuita y operativa."
17
  )
18
 
19
  demo.launch()