kantundpeterpan commited on
Commit
f67d5ad
·
1 Parent(s): 797dae5
Files changed (2) hide show
  1. app.py +0 -3
  2. tasks/text.py +3 -2
app.py CHANGED
@@ -4,9 +4,6 @@ from tasks import text, image, audio
4
 
5
  from skops.hub_utils import download
6
 
7
- #download model for text task
8
- download(repo_id = "kantundpeterpan/frugal-ai-toy", dst = "tasks/model")
9
-
10
  # Load environment variables
11
  load_dotenv()
12
 
 
4
 
5
  from skops.hub_utils import download
6
 
 
 
 
7
  # Load environment variables
8
  load_dotenv()
9
 
tasks/text.py CHANGED
@@ -27,8 +27,9 @@ print()
27
  print("### Task Dir")
28
  print(os.listdir("./tasks"))
29
 
30
- #download model for text task
31
- download(repo_id = "kantundpeterpan/frugal-ai-toy", dst = "tasks/model")
 
32
 
33
  import random
34
 
 
27
  print("### Task Dir")
28
  print(os.listdir("./tasks"))
29
 
30
+ if not os.path.exists("tasks/model"):
31
+ #download model for text task
32
+ download(repo_id = "kantundpeterpan/frugal-ai-toy", dst = "tasks/model")
33
 
34
  import random
35