tjlscrap / app.py
Adr740's picture
Upload 5 files
6caef3b verified
import gradio as gr
import os
from functools import partial
from full_scraping_script_v3 import run_scrapping
import gdown
from config import json_url_id
download_url = f'https://drive.google.com/uc?id={json_url_id}'
output = 'secret_google_service_account.json'
gdown.download(download_url, output, quiet=False)
title = ""
with gr.Blocks(title=title,theme='nota-ai/theme',css="footer {visibility: hidden}") as demo:
gr.Markdown(f"## {title}")
with gr.Row():
with gr.Column(scale=6):
with gr.Row():
with gr.Column(scale=8):
password = gr.Textbox( lines=1, label="Tatooine password")
cookie = gr.Textbox( lines=1, label="Cookie")
with gr.Column(scale=1):
chat_submit_button = gr.Button(value="Submit ▶")
with gr.Row():
listing = gr.Markdown("Waiting for password...")
fn_chat = run_scrapping
chat_submit_button.click(fn=fn_chat, inputs=[password, cookie], outputs=[listing])
demo.launch(max_threads=40)