Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,22 @@
|
|
1 |
import gradio as gr
|
2 |
from main import main
|
3 |
import json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
def rexplore_summarizer(url, title, id, citation, access_key):
|
6 |
response = json.loads(main(url, title, id, citation, access_key))
|
@@ -64,4 +80,5 @@ with gr.Blocks(theme=theme, title="ReXplore Summarizer", fill_height=True) as ap
|
|
64 |
)
|
65 |
clear_btn.click(clear_everything, inputs=[url, title, id, citation, raw_data, summary, mindmap, access_key], outputs=[url, id, raw_data, summary, mindmap, access_key], show_api=False)
|
66 |
|
|
|
67 |
app.queue(default_concurrency_limit=25).launch(show_api=True, ssr_mode=False)
|
|
|
1 |
import gradio as gr
|
2 |
from main import main
|
3 |
import json
|
4 |
+
import subprocess
|
5 |
+
|
6 |
+
def installChrome():
|
7 |
+
# Update package list
|
8 |
+
subprocess.run(['apt-get', 'update'])
|
9 |
+
# Install wget and unzip
|
10 |
+
subprocess.run(['apt-get', 'install', '-y', 'wget', 'unzip'])
|
11 |
+
# Download Google Chrome
|
12 |
+
subprocess.run(['wget', 'https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb'])
|
13 |
+
# Install Google Chrome
|
14 |
+
subprocess.run(['apt-get', 'install', '-y', './google-chrome-stable_current_amd64.deb'])
|
15 |
+
# Remove the downloaded package
|
16 |
+
subprocess.run(['rm', 'google-chrome-stable_current_amd64.deb'])
|
17 |
+
# Clean up
|
18 |
+
subprocess.run(['apt-get', 'clean'])
|
19 |
+
|
20 |
|
21 |
def rexplore_summarizer(url, title, id, citation, access_key):
|
22 |
response = json.loads(main(url, title, id, citation, access_key))
|
|
|
80 |
)
|
81 |
clear_btn.click(clear_everything, inputs=[url, title, id, citation, raw_data, summary, mindmap, access_key], outputs=[url, id, raw_data, summary, mindmap, access_key], show_api=False)
|
82 |
|
83 |
+
installChrome()
|
84 |
app.queue(default_concurrency_limit=25).launch(show_api=True, ssr_mode=False)
|