Spaces:
Runtime error
Runtime error
edumunozsala
commited on
Commit
•
8afea45
1
Parent(s):
721ea4b
Update app.py
Browse filesFixed some typos
app.py
CHANGED
@@ -1,16 +1,12 @@
|
|
1 |
-
import datetime
|
2 |
-
|
3 |
import gradio as gr
|
|
|
4 |
import torch
|
5 |
|
6 |
from transformers import (
|
7 |
AutoModelForCausalLM,
|
8 |
AutoTokenizer,
|
9 |
BitsAndBytesConfig,
|
10 |
-
pipeline
|
11 |
-
GenerationConfig,
|
12 |
-
LogitsProcessorList,
|
13 |
-
TextStreamer,
|
14 |
)
|
15 |
|
16 |
model_id = "somosnlp/gemma-7b-it-legal-refugee-v0.1.1"
|
@@ -49,7 +45,7 @@ demo = gr.Interface(
|
|
49 |
gr.Textbox(
|
50 |
label="🌐 Pregunta a resolver",
|
51 |
info="Introduce la duda o pregunta que la que deseas obtener información.",
|
52 |
-
value="
|
53 |
interactive=True,
|
54 |
)
|
55 |
],
|
@@ -58,7 +54,7 @@ demo = gr.Interface(
|
|
58 |
label="📰 Respuesta e información",
|
59 |
interactive=False,
|
60 |
placeholder="Aquí aparecerá la respuesta o información solicitada",
|
61 |
-
)
|
62 |
],
|
63 |
headline="LEGAL REFUGIADOS 1.0 ",
|
64 |
#thumbnail="https://huggingface.co/datasets/Iker/NoticIA/resolve/main/assets/logo.png",
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
+
|
3 |
import torch
|
4 |
|
5 |
from transformers import (
|
6 |
AutoModelForCausalLM,
|
7 |
AutoTokenizer,
|
8 |
BitsAndBytesConfig,
|
9 |
+
pipeline
|
|
|
|
|
|
|
10 |
)
|
11 |
|
12 |
model_id = "somosnlp/gemma-7b-it-legal-refugee-v0.1.1"
|
|
|
45 |
gr.Textbox(
|
46 |
label="🌐 Pregunta a resolver",
|
47 |
info="Introduce la duda o pregunta que la que deseas obtener información.",
|
48 |
+
value="Pregunta de prueba",
|
49 |
interactive=True,
|
50 |
)
|
51 |
],
|
|
|
54 |
label="📰 Respuesta e información",
|
55 |
interactive=False,
|
56 |
placeholder="Aquí aparecerá la respuesta o información solicitada",
|
57 |
+
)
|
58 |
],
|
59 |
headline="LEGAL REFUGIADOS 1.0 ",
|
60 |
#thumbnail="https://huggingface.co/datasets/Iker/NoticIA/resolve/main/assets/logo.png",
|