MJSHIN0122 commited on
Commit
2a6cd04
1 Parent(s): b7a937b

클론 경로 수정

Browse files
Files changed (4) hide show
  1. __init__.py +0 -0
  2. entrypoint.sh +2 -2
  3. init_app.py +6 -6
  4. requirements.txt +2 -2
__init__.py ADDED
File without changes
entrypoint.sh CHANGED
@@ -1,4 +1,4 @@
1
  #!/bin/sh
2
  python init_app.py
3
- python ./api/main.py
4
- gunicorn -k uvicorn.workers.UvicornWorker -b 0.0.0.0:7860 api.main:app
 
1
  #!/bin/sh
2
  python init_app.py
3
+ python ./repo/api/main.py
4
+ gunicorn -k uvicorn.workers.UvicornWorker -b 0.0.0.0:7860 repo.api.main:app
init_app.py CHANGED
@@ -3,7 +3,7 @@ from git import Repo
3
  import sys
4
 
5
  access_token = os.environ['AccessTokenToPrivate']
6
- repo = Repo.clone_from(f"https://MJSHIN0122:{access_token}@huggingface.co/spaces/MJSHIN0122/narrative_api.git", ".")
7
 
8
  print("Clone Done.")
9
 
@@ -11,9 +11,9 @@ repo.submodule_update(init=True)
11
 
12
  print("Clone and submodule update done.")
13
 
14
- sys.path.append(os.path.abspath("."))
15
- sys.path.append(os.path.abspath("./api"))
16
- sys.path.append(os.path.abspath("./khala_network"))
17
- sys.path.append(os.path.abspath("./khala_network/src"))
18
 
19
- import api.main
 
3
  import sys
4
 
5
  access_token = os.environ['AccessTokenToPrivate']
6
+ repo = Repo.clone_from(f"https://MJSHIN0122:{access_token}@huggingface.co/spaces/MJSHIN0122/narrative_api.git", "./repo")
7
 
8
  print("Clone Done.")
9
 
 
11
 
12
  print("Clone and submodule update done.")
13
 
14
+ sys.path.append(os.path.abspath("./repo"))
15
+ sys.path.append(os.path.abspath("./repo/api"))
16
+ sys.path.append(os.path.abspath("./repo/khala_network"))
17
+ sys.path.append(os.path.abspath("./repo/khala_network/src"))
18
 
19
+ import repo.api.main
requirements.txt CHANGED
@@ -87,7 +87,6 @@ mpmath==1.3.0
87
  multidict==6.0.5
88
  multiprocess==0.70.16
89
  mypy-extensions==1.0.0
90
- neo4j-driver==5.17.0
91
  nest-asyncio==1.6.0
92
  networkx==3.2.1
93
  nltk==3.8.1
@@ -173,4 +172,5 @@ Werkzeug==3.0.1
173
  wrapt==1.16.0
174
  xxhash==3.4.1
175
  yarl==1.9.4
176
- zipp==3.17.0
 
 
87
  multidict==6.0.5
88
  multiprocess==0.70.16
89
  mypy-extensions==1.0.0
 
90
  nest-asyncio==1.6.0
91
  networkx==3.2.1
92
  nltk==3.8.1
 
172
  wrapt==1.16.0
173
  xxhash==3.4.1
174
  yarl==1.9.4
175
+ zipp==3.17.0
176
+ gunicorn