fittar commited on
Commit
e5e6441
1 Parent(s): 6a6d135

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -13
app.py CHANGED
@@ -1,20 +1,19 @@
1
- import os
 
 
 
 
2
 
3
- temp_dir = './temp/'
4
- os.environ["CUDA_VISIBLE_DEVICES"] = "0"
5
- os.environ['TMPDIR'] = temp_dir
6
  import gradio as gr
7
- import shutil
8
  from summagery_pipline import Summagery
9
 
10
- if os.path.exists(temp_dir):
11
- try:
12
- shutil.rmtree(temp_dir)
13
- print(f"The directory at {temp_dir} has been removed successfully along with its contents.")
14
- except OSError as e:
15
- print(f"Error: {temp_dir} - {e}")
16
-
17
- os.makedirs(temp_dir, exist_ok=True)
18
 
19
  def generate(text, batch_size, model_type, abstractness):
20
 
 
1
+ #import os
2
+ # temp_dir = './temp/'
3
+ # os.environ["CUDA_VISIBLE_DEVICES"] = "0"
4
+ # os.environ['TMPDIR'] = temp_dir
5
+ # import shutil
6
 
 
 
 
7
  import gradio as gr
 
8
  from summagery_pipline import Summagery
9
 
10
+ # if os.path.exists(temp_dir):
11
+ # try:
12
+ # shutil.rmtree(temp_dir)
13
+ # print(f"The directory at {temp_dir} has been removed successfully along with its contents.")
14
+ # except OSError as e:
15
+ # print(f"Error: {temp_dir} - {e}")
16
+ # os.makedirs(temp_dir, exist_ok=True)
 
17
 
18
  def generate(text, batch_size, model_type, abstractness):
19