Spaces:
Runtime error
Runtime error
Upload folder using huggingface_hub
Browse files
webapp.py
CHANGED
@@ -1,19 +1,25 @@
|
|
1 |
import gradio as gr
|
2 |
from utils import get_comments, get_users_from_keyword
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
|
|
9 |
|
10 |
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
|
|
16 |
|
17 |
-
|
|
|
|
|
|
|
|
|
18 |
|
19 |
demo.launch(share=True)
|
|
|
1 |
import gradio as gr
|
2 |
from utils import get_comments, get_users_from_keyword
|
3 |
|
4 |
+
with gr.Blocks() as iface1:
|
5 |
+
with gr.Row():
|
6 |
+
input_url =gr.Textbox(label="Instagram URL")
|
7 |
+
search = gr.Button("Search")
|
8 |
+
output_component = gr.Dataframe(headers=['username','comment_text','user_is_verfied','user_is_private', 'commment_like_count'])
|
9 |
+
search.click(fn=get_comments, inputs=input_url, outputs=output_component,api_name="search_function")
|
10 |
|
11 |
|
12 |
+
with gr.Blocks() as iface2:
|
13 |
+
with gr.Row():
|
14 |
+
input_url =gr.Textbox(label="Keyword")
|
15 |
+
search = gr.Button("Search")
|
16 |
+
output_component = gr.Dataframe(headers=['username','is_verified'])
|
17 |
+
search.click(fn=get_users_from_keyword, inputs=input_url, outputs=output_component,api_name="search_function")
|
18 |
|
19 |
+
|
20 |
+
|
21 |
+
demo = gr.TabbedInterface([iface1, iface2], [
|
22 |
+
"Instagram comment extractor", "Instagram user keyword search"],
|
23 |
+
title = "Instagram scraping tool")
|
24 |
|
25 |
demo.launch(share=True)
|