mateoluksenberg commited on
Commit
758e4e6
·
verified ·
1 Parent(s): 0757b30

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -210,8 +210,8 @@ EXAMPLES = [
210
 
211
 
212
  # Definir la función simple_chat
213
- # @spaces.GPU()
214
- async 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,7 +266,7 @@ async def test_endpoint(message: dict):
266
  if "file" not in message:
267
  print("Sin File")
268
 
269
- response = await simple_chat(message)
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: