Update app.py
Browse files
app.py
CHANGED
|
@@ -208,7 +208,7 @@ def get_scrape_data(csv_file, social_media, password):
|
|
| 208 |
file_name = f'./{social_media}_output.csv'
|
| 209 |
output_df.to_csv(f'./{social_media}_output.csv')
|
| 210 |
completion_status = "Done"
|
| 211 |
-
return completion_status, gr.DownloadButton(label='Download AI Content', value=file_name, visible=True)
|
| 212 |
|
| 213 |
|
| 214 |
with gr.Blocks() as block:
|
|
@@ -227,9 +227,10 @@ with gr.Blocks() as block:
|
|
| 227 |
social_media = gr.Radio(choices=['LinkedIn', 'Instagram'], label='Which Social Media?', info = 'Which Social Media do you want to scrape from?')
|
| 228 |
con_gen_btn = gr.Button('Scrape')
|
| 229 |
status = gr.Textbox(label='Completion Status')
|
|
|
|
| 230 |
download_btn = gr.DownloadButton(label='Download Content', visible=False)
|
| 231 |
|
| 232 |
-
con_gen_btn.click(get_scrape_data, inputs=[csv_file, social_media, password], outputs=[status, download_btn])
|
| 233 |
|
| 234 |
|
| 235 |
block.queue(default_concurrency_limit=5)
|
|
|
|
| 208 |
file_name = f'./{social_media}_output.csv'
|
| 209 |
output_df.to_csv(f'./{social_media}_output.csv')
|
| 210 |
completion_status = "Done"
|
| 211 |
+
return completion_status, gr.DownloadButton(label='Download AI Content', value=file_name, visible=True), output_df
|
| 212 |
|
| 213 |
|
| 214 |
with gr.Blocks() as block:
|
|
|
|
| 227 |
social_media = gr.Radio(choices=['LinkedIn', 'Instagram'], label='Which Social Media?', info = 'Which Social Media do you want to scrape from?')
|
| 228 |
con_gen_btn = gr.Button('Scrape')
|
| 229 |
status = gr.Textbox(label='Completion Status')
|
| 230 |
+
data = gr.DataFrame(label='Scraped Data')
|
| 231 |
download_btn = gr.DownloadButton(label='Download Content', visible=False)
|
| 232 |
|
| 233 |
+
con_gen_btn.click(get_scrape_data, inputs=[csv_file, social_media, password], outputs=[status, download_btn, data])
|
| 234 |
|
| 235 |
|
| 236 |
block.queue(default_concurrency_limit=5)
|