qqwjq1981 commited on
Commit
79f05ff
·
verified ·
1 Parent(s): d6fb2ea

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -11
app.py CHANGED
@@ -4,16 +4,11 @@
4
  # In[14]:
5
 
6
 
7
- pip install gradio newspaper3k transformers sentence-transformers openai lxml_html_clean difflib
8
-
9
-
10
- # In[15]:
11
-
12
-
13
- get_ipython().system('pip show openai')
14
- get_ipython().system('pip uninstall newspaper3k -y')
15
- get_ipython().system('pip install newspaper3k')
16
 
 
 
17
 
18
  # In[16]:
19
 
@@ -43,8 +38,6 @@ import gradio as gr
43
 
44
  import json
45
 
46
- import difflib
47
-
48
 
49
  # In[17]:
50
 
 
4
  # In[14]:
5
 
6
 
7
+ import subprocess
8
+ import sys
 
 
 
 
 
 
 
9
 
10
+ # Install dependencies if not already installed
11
+ subprocess.check_call([sys.executable, "-m", "pip", "install", "gradio", "newspaper3k", "transformers", "sentence-transformers", "openai", "lxml"])
12
 
13
  # In[16]:
14
 
 
38
 
39
  import json
40
 
 
 
41
 
42
  # In[17]:
43