Spaces:
Sleeping
Sleeping
laurentiubp
commited on
Commit
•
acd5f2b
1
Parent(s):
d15a5e9
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ MAX_INPUT_TOKEN_LENGTH = 8192
|
|
12 |
|
13 |
|
14 |
DESCRIPTION = """\
|
15 |
-
# CataLlama-v0.1
|
16 |
This Space demonstrates model [CataLlama-v0.1-Instruct-DPO](https://huggingface.co/catallama/CataLlama-v0.1-Instruct-DPO).
|
17 |
|
18 |
CataLlama is a fine-tune of Llama-3-8B to enhance it's proficiency on the Catalan Language.
|
@@ -42,7 +42,7 @@ if torch.cuda.is_available():
|
|
42 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
43 |
|
44 |
|
45 |
-
@spaces.GPU
|
46 |
def generate(
|
47 |
message: str,
|
48 |
chat_history: list[tuple[str, str]],
|
@@ -90,7 +90,7 @@ chat_interface = gr.ChatInterface(
|
|
90 |
fn=generate,
|
91 |
additional_inputs=[
|
92 |
gr.Textbox(
|
93 |
-
value="Ets un chatbot amigable. Responeu preguntes i ajudeu els usuaris",
|
94 |
label="System message",
|
95 |
lines=6
|
96 |
),
|
@@ -104,7 +104,7 @@ chat_interface = gr.ChatInterface(
|
|
104 |
gr.Slider(
|
105 |
minimum=0.1,
|
106 |
maximum=1.0,
|
107 |
-
value=0.
|
108 |
step=0.05,
|
109 |
label="Temperature"
|
110 |
),
|
|
|
12 |
|
13 |
|
14 |
DESCRIPTION = """\
|
15 |
+
# CataLlama-v0.1-Instruct-DPO
|
16 |
This Space demonstrates model [CataLlama-v0.1-Instruct-DPO](https://huggingface.co/catallama/CataLlama-v0.1-Instruct-DPO).
|
17 |
|
18 |
CataLlama is a fine-tune of Llama-3-8B to enhance it's proficiency on the Catalan Language.
|
|
|
42 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
43 |
|
44 |
|
45 |
+
@spaces.GPU(duration=120)
|
46 |
def generate(
|
47 |
message: str,
|
48 |
chat_history: list[tuple[str, str]],
|
|
|
90 |
fn=generate,
|
91 |
additional_inputs=[
|
92 |
gr.Textbox(
|
93 |
+
value="Ets un chatbot amigable. Responeu preguntes i ajudeu els usuaris.",
|
94 |
label="System message",
|
95 |
lines=6
|
96 |
),
|
|
|
104 |
gr.Slider(
|
105 |
minimum=0.1,
|
106 |
maximum=1.0,
|
107 |
+
value=0.3,
|
108 |
step=0.05,
|
109 |
label="Temperature"
|
110 |
),
|