nikhmr1235 commited on
Commit
2eb2e08
·
verified ·
1 Parent(s): 054e6c6

attempt to fix UI upload file function update

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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.Group.update(visible=True)
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.Group.update(visible=False)
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):