Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
| 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)
|