CamiloVega commited on
Commit
6b01013
·
verified ·
1 Parent(s): f23e4af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -19
app.py CHANGED
@@ -316,8 +316,8 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
316
 
317
  with gr.Column(scale=3):
318
  chatbot = gr.Chatbot(
319
- show_label=False,
320
- container=True,
321
  height=600,
322
  show_copy_button=True
323
  )
@@ -387,20 +387,10 @@ if __name__ == "__main__":
387
  print("Example: export HUGGINGFACE_TOKEN=your_token_here")
388
  exit(1)
389
 
390
- # Create upload directory if it doesn't exist
391
- if not os.path.exists(UPLOAD_FOLDER):
392
- os.makedirs(UPLOAD_FOLDER)
393
- logger.info(f"Created upload directory: {UPLOAD_FOLDER}")
394
-
395
- try:
396
- # Launch the Gradio interface
397
- demo.launch(
398
- share=False, # Set to True if you want to create a public link
399
- server_name="0.0.0.0", # Listen on all network interfaces
400
- server_port=7860, # Default Gradio port
401
- show_error=True,
402
- enable_queue=True
403
- )
404
- except Exception as e:
405
- logger.error(f"Error launching Gradio interface: {str(e)}")
406
- raise
 
316
 
317
  with gr.Column(scale=3):
318
  chatbot = gr.Chatbot(
319
+ value=[],
320
+ label="Chat",
321
  height=600,
322
  show_copy_button=True
323
  )
 
387
  print("Example: export HUGGINGFACE_TOKEN=your_token_here")
388
  exit(1)
389
 
390
+ # Launch the application
391
+ demo.launch(
392
+ server_name="0.0.0.0",
393
+ server_port=7860,
394
+ share=False,
395
+ show_error=True
396
+ )