Spaces:
Runtime error
Runtime error
Commit ·
3c8f550
1
Parent(s): 1e580b8
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,19 +9,20 @@ Original file is located at
|
|
| 9 |
# installs
|
| 10 |
"""
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
|
|
|
| 25 |
# Commented out IPython magic to ensure Python compatibility.
|
| 26 |
# %cd '/content/AbstractGeneratorES'
|
| 27 |
|
|
@@ -38,7 +39,7 @@ if not os.path.isdir(os.path.join("models", model_name)):
|
|
| 38 |
print(f"Downloading {model_name} model...")
|
| 39 |
gpt2.download_gpt2(model_name=model_name)
|
| 40 |
|
| 41 |
-
path = 'AbstractGenerator/'
|
| 42 |
checkpoint_dir =path+'weights/'
|
| 43 |
data_path = path+'TrainigData/'
|
| 44 |
|
|
@@ -171,4 +172,4 @@ with block:
|
|
| 171 |
cn_run = gr.Button("Run")
|
| 172 |
cn_run.click(generated_abstract, inputs=[type_of_input, cn_text], outputs=cn_results1)
|
| 173 |
|
| 174 |
-
block.launch(debug = True)
|
|
|
|
| 9 |
# installs
|
| 10 |
"""
|
| 11 |
|
| 12 |
+
import os
|
| 13 |
+
os.system('pip install gpt_2_simple')
|
| 14 |
+
os.system('pip install os.system')
|
| 15 |
+
os.system('pip install gradio')
|
| 16 |
+
os.system('pip install huggingface_hub')
|
| 17 |
+
os.system('pip install easynmt')
|
| 18 |
+
os.system('pip install sentence-transformers')
|
| 19 |
+
os.system('curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash')
|
| 20 |
+
os.system('apt-get install git-lfs')
|
| 21 |
+
os.system('git lfs install')
|
| 22 |
+
os.system('git clone https://huggingface.co/franz96521/AbstractGeneratorES ')
|
| 23 |
+
#os.system('cd AbstractGeneratorES')
|
| 24 |
+
print(os.getcwd())
|
| 25 |
+
print(os.listdir())
|
| 26 |
# Commented out IPython magic to ensure Python compatibility.
|
| 27 |
# %cd '/content/AbstractGeneratorES'
|
| 28 |
|
|
|
|
| 39 |
print(f"Downloading {model_name} model...")
|
| 40 |
gpt2.download_gpt2(model_name=model_name)
|
| 41 |
|
| 42 |
+
path = os.getcwd()+'/AbstractGeneratorES/AbstractGenerator/'
|
| 43 |
checkpoint_dir =path+'weights/'
|
| 44 |
data_path = path+'TrainigData/'
|
| 45 |
|
|
|
|
| 172 |
cn_run = gr.Button("Run")
|
| 173 |
cn_run.click(generated_abstract, inputs=[type_of_input, cn_text], outputs=cn_results1)
|
| 174 |
|
| 175 |
+
block.launch(debug = True)
|