Update app.py
Browse files
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
|
| 84 |
with open(file_path, "wb") as f:
|
| 85 |
f.write(file.read())
|
| 86 |
-
return f"File {file
|
| 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:
|