anasmkh commited on
Commit
008970e
·
verified ·
1 Parent(s): 90b92b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -80,10 +80,10 @@ def upload_file(file):
80
  # Save the uploaded file to the "new_file" directory
81
  if not os.path.exists("new_file"):
82
  os.makedirs("new_file")
83
- file_path = os.path.join("new_file", file.name)
84
  with open(file_path, "wb") as f:
85
  f.write(file.read())
86
- return f"File {file.name} uploaded successfully!"
87
 
88
  def gradio_chatbot():
89
  with gr.Blocks() as demo:
 
80
  # Save the uploaded file to the "new_file" directory
81
  if not os.path.exists("new_file"):
82
  os.makedirs("new_file")
83
+ file_path = os.path.join("new_file", file)
84
  with open(file_path, "wb") as f:
85
  f.write(file.read())
86
+ return f"File {file} uploaded successfully!"
87
 
88
  def gradio_chatbot():
89
  with gr.Blocks() as demo: