Spaces:
Sleeping
Sleeping
Update alternative-2.py
Browse files- alternative-2.py +3 -5
alternative-2.py
CHANGED
@@ -149,18 +149,16 @@ with gr.Blocks(theme="sudeepshouche/minimalist") as demo:
|
|
149 |
with gr.Column():
|
150 |
url_input = gr.Textbox(label="Enter your comma separated URLs here")
|
151 |
loader_dropdown = gr.Dropdown(choices=choices, label="Pick your Loader from here")
|
|
|
152 |
with gr.Column():
|
|
|
|
|
153 |
json_output = gr.JSON(label="Extracted Data (JSON)")
|
154 |
text_output = gr.Textbox(label="Extracted Data (Text)")
|
155 |
|
156 |
btn = gr.Button("Extract Data")
|
157 |
btn.click(extractDataFromUrls, inputs=[url_input, loader_dropdown], outputs=[json_output, text_output, extracted_url]) \
|
158 |
.then(take_webdata, inputs=extracted_url, outputs=[screenshot_output, title_output], queue=True)
|
159 |
-
|
160 |
-
with gr.Tab("Images"):
|
161 |
-
with gr.Row():
|
162 |
-
screenshot_output = gr.Image(label="Screenshot")
|
163 |
-
title_output = gr.Textbox(label="Page Title")
|
164 |
|
165 |
# Launch the Gradio interface
|
166 |
demo.launch()
|
|
|
149 |
with gr.Column():
|
150 |
url_input = gr.Textbox(label="Enter your comma separated URLs here")
|
151 |
loader_dropdown = gr.Dropdown(choices=choices, label="Pick your Loader from here")
|
152 |
+
btn = gr.Button("Extract Data")
|
153 |
with gr.Column():
|
154 |
+
screenshot_output = gr.Image(label="Screenshot")
|
155 |
+
title_output = gr.Textbox(label="Page Title")
|
156 |
json_output = gr.JSON(label="Extracted Data (JSON)")
|
157 |
text_output = gr.Textbox(label="Extracted Data (Text)")
|
158 |
|
159 |
btn = gr.Button("Extract Data")
|
160 |
btn.click(extractDataFromUrls, inputs=[url_input, loader_dropdown], outputs=[json_output, text_output, extracted_url]) \
|
161 |
.then(take_webdata, inputs=extracted_url, outputs=[screenshot_output, title_output], queue=True)
|
|
|
|
|
|
|
|
|
|
|
162 |
|
163 |
# Launch the Gradio interface
|
164 |
demo.launch()
|