jamesthong commited on
Commit
48230d0
·
verified ·
1 Parent(s): 23c03a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -102,11 +102,12 @@ def source (radio, source1, source2):
102
  with gr.Blocks() as demo:
103
  vectorstore = gr.State()
104
  with gr.Tab("Setup"):
105
- radio = gr.Radio(["website", "PDF"], label="Select type of source", interactive=True)
106
- path = gr.Textbox(label="Path of source", visible=True, interactive=False)
107
  with gr.Row():
108
  source1 = gr.Textbox(label="Input website",)
109
  source2 = gr.Files(label="Upload a PDF file", file_count="single", file_types=["pdf"])
 
 
110
  radio.change(fn=source, inputs=[radio,source1,source2], outputs=path)
111
  source1.change(fn=source, inputs=[radio,source1,source2], outputs=path)
112
  source2.change(fn=source, inputs=[radio,source1,source2], outputs=path)
 
102
  with gr.Blocks() as demo:
103
  vectorstore = gr.State()
104
  with gr.Tab("Setup"):
105
+
 
106
  with gr.Row():
107
  source1 = gr.Textbox(label="Input website",)
108
  source2 = gr.Files(label="Upload a PDF file", file_count="single", file_types=["pdf"])
109
+ radio = gr.Radio(["website", "PDF"], label="Select type of source", interactive=True)
110
+ path = gr.Textbox(label="Path of source", visible=True, interactive=False)
111
  radio.change(fn=source, inputs=[radio,source1,source2], outputs=path)
112
  source1.change(fn=source, inputs=[radio,source1,source2], outputs=path)
113
  source2.change(fn=source, inputs=[radio,source1,source2], outputs=path)