Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -210,8 +210,8 @@ EXAMPLES = [
|
|
210 |
|
211 |
|
212 |
# Definir la función simple_chat
|
213 |
-
|
214 |
-
|
215 |
# Cargar el modelo preentrenado
|
216 |
model = AutoModelForCausalLM.from_pretrained(
|
217 |
MODEL_ID,
|
@@ -266,7 +266,7 @@ async def test_endpoint(message: dict):
|
|
266 |
if "file" not in message:
|
267 |
print("Sin File")
|
268 |
|
269 |
-
response =
|
270 |
return response
|
271 |
|
272 |
with gr.Blocks(css=CSS, theme="soft", fill_height=True) as demo:
|
|
|
210 |
|
211 |
|
212 |
# Definir la función simple_chat
|
213 |
+
@spaces.GPU()
|
214 |
+
def simple_chat(message: dict, temperature: float = 0.8, max_length: int = 4096, top_p: float = 1, top_k: int = 10, penalty: float = 1.0):
|
215 |
# Cargar el modelo preentrenado
|
216 |
model = AutoModelForCausalLM.from_pretrained(
|
217 |
MODEL_ID,
|
|
|
266 |
if "file" not in message:
|
267 |
print("Sin File")
|
268 |
|
269 |
+
response = simple_chat(message)
|
270 |
return response
|
271 |
|
272 |
with gr.Blocks(css=CSS, theme="soft", fill_height=True) as demo:
|