Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -10,8 +10,8 @@ import os
|
|
10 |
#base_model_name = "unsloth/Mistral-7B-Instruct-v0.2"
|
11 |
#sft_model = "somosnlp/ComeBien_gemma-2b-it-bnb-4bit"
|
12 |
sft_model = "somosnlp/RecetasDeLaAbuela5k_gemma-2b-bnb-4bit"
|
13 |
-
#base_model_name = "unsloth/gemma-2b-
|
14 |
-
base_model_name = "unsloth/gemma-2b-bnb-4bit"
|
15 |
|
16 |
max_seq_length=2000
|
17 |
base_model = AutoModelForCausalLM.from_pretrained(base_model_name,return_dict=True,device_map="auto", torch_dtype=torch.float16,)
|
@@ -82,7 +82,7 @@ mis_ejemplos = [
|
|
82 |
|
83 |
iface = gr.Interface(
|
84 |
fn=mostrar_respuesta,
|
85 |
-
inputs=[gr.Textbox(label="Pregunta"), gr.Textbox(label="Contexto", value="
|
86 |
outputs=[gr.Textbox(label="Respuesta", lines=2),],
|
87 |
title="ComeBien",
|
88 |
description="Introduce tu pregunta sobre recetas de cocina.",
|
|
|
10 |
#base_model_name = "unsloth/Mistral-7B-Instruct-v0.2"
|
11 |
#sft_model = "somosnlp/ComeBien_gemma-2b-it-bnb-4bit"
|
12 |
sft_model = "somosnlp/RecetasDeLaAbuela5k_gemma-2b-bnb-4bit"
|
13 |
+
#base_model_name = "unsloth/gemma-2b-bnb-4bit"
|
14 |
+
base_model_name = "unsloth/gemma-2b-it-bnb-4bit"
|
15 |
|
16 |
max_seq_length=2000
|
17 |
base_model = AutoModelForCausalLM.from_pretrained(base_model_name,return_dict=True,device_map="auto", torch_dtype=torch.float16,)
|
|
|
82 |
|
83 |
iface = gr.Interface(
|
84 |
fn=mostrar_respuesta,
|
85 |
+
inputs=[gr.Textbox(label="Pregunta"), gr.Textbox(label="Contexto", value="Eres un experto cocinero hispanoamericano."),],
|
86 |
outputs=[gr.Textbox(label="Respuesta", lines=2),],
|
87 |
title="ComeBien",
|
88 |
description="Introduce tu pregunta sobre recetas de cocina.",
|