mateoluksenberg commited on
Commit
0ffc740
·
verified ·
1 Parent(s): b46d076

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -319,10 +319,6 @@ def simple_chat(message: dict, temperature: float = 0.8, max_length: int = 4096,
319
  format_msg = contents + "\n\n\n" + "{} files uploaded.\n".format(len(message["files"])) + message['text']
320
  conversation.append({"role": "user", "content": format_msg})
321
  else:
322
- # Handle case where no file is uploaded
323
- if not history:
324
- # You might want to handle this case depending on your use case
325
- # raise gr.Error("Please upload an image first.")
326
  contents = None
327
  conversation.append({"role": "user", "content": message['text']})
328
 
@@ -373,6 +369,7 @@ async def test_endpoint(
373
  "file_name": None
374
  }
375
 
 
376
  # Llamar a la función `simple_chat` con el mensaje
377
  response = simple_chat(message)
378
 
 
319
  format_msg = contents + "\n\n\n" + "{} files uploaded.\n".format(len(message["files"])) + message['text']
320
  conversation.append({"role": "user", "content": format_msg})
321
  else:
 
 
 
 
322
  contents = None
323
  conversation.append({"role": "user", "content": message['text']})
324
 
 
369
  "file_name": None
370
  }
371
 
372
+ print(message)
373
  # Llamar a la función `simple_chat` con el mensaje
374
  response = simple_chat(message)
375