Spaces:
Sleeping
Sleeping
attempt to fix UI upload file function update
Browse files
app.py
CHANGED
|
@@ -57,8 +57,8 @@ class PDFChatbot:
|
|
| 57 |
gr.Info("PDF processed successfully! You can now ask questions about the document.")
|
| 58 |
|
| 59 |
return (
|
| 60 |
-
gr.update(interactive=False),
|
| 61 |
-
gr.
|
| 62 |
)
|
| 63 |
except Exception as e:
|
| 64 |
if os.path.exists(self.state.vector_store_path):
|
|
@@ -66,7 +66,7 @@ class PDFChatbot:
|
|
| 66 |
gr.Error(f"An error occurred: {str(e)}")
|
| 67 |
return (
|
| 68 |
gr.update(interactive=True),
|
| 69 |
-
gr.
|
| 70 |
)
|
| 71 |
|
| 72 |
def chat_with_pdf(self, message, history):
|
|
|
|
| 57 |
gr.Info("PDF processed successfully! You can now ask questions about the document.")
|
| 58 |
|
| 59 |
return (
|
| 60 |
+
gr.update(interactive=False, value=None), # Clear the file upload input
|
| 61 |
+
gr.update(visible=True)
|
| 62 |
)
|
| 63 |
except Exception as e:
|
| 64 |
if os.path.exists(self.state.vector_store_path):
|
|
|
|
| 66 |
gr.Error(f"An error occurred: {str(e)}")
|
| 67 |
return (
|
| 68 |
gr.update(interactive=True),
|
| 69 |
+
gr.update(visible=False)
|
| 70 |
)
|
| 71 |
|
| 72 |
def chat_with_pdf(self, message, history):
|