q6 commited on
Commit
2b5e5e4
·
1 Parent(s): 75c6803
Files changed (3) hide show
  1. API/app.py +0 -1
  2. Client/Extract Pixiv/ai_search.py +2 -1
  3. Dockerfile +1 -1
API/app.py CHANGED
@@ -19,7 +19,6 @@ class PixifDownloadModel(BaseModel):
19
 
20
  env_path = os.path.dirname(os.path.realpath(__file__)) + "/../.env"
21
 
22
- load_dotenv(env_path)
23
  PHPSESSID = os.getenv("PHPSESSID")
24
 
25
  cookies = {"PHPSESSID": PHPSESSID}
 
19
 
20
  env_path = os.path.dirname(os.path.realpath(__file__)) + "/../.env"
21
 
 
22
  PHPSESSID = os.getenv("PHPSESSID")
23
 
24
  cookies = {"PHPSESSID": PHPSESSID}
Client/Extract Pixiv/ai_search.py CHANGED
@@ -1,7 +1,7 @@
1
  import requests
2
  import os
3
 
4
- local = 0
5
  if local:
6
  endpoint = "http://127.0.0.1:7860"
7
  else:
@@ -23,6 +23,7 @@ params = {
23
  response = requests.get(f'{endpoint}/search', params=params)
24
 
25
  data = response.json()
 
26
  post_ids = data['post_ids']
27
  post_ids = list(dict.fromkeys(post_ids))
28
  with open(f"../{data['filename']}.txt", "w") as f:
 
1
  import requests
2
  import os
3
 
4
+ local = 1
5
  if local:
6
  endpoint = "http://127.0.0.1:7860"
7
  else:
 
23
  response = requests.get(f'{endpoint}/search', params=params)
24
 
25
  data = response.json()
26
+ print(data)
27
  post_ids = data['post_ids']
28
  post_ids = list(dict.fromkeys(post_ids))
29
  with open(f"../{data['filename']}.txt", "w") as f:
Dockerfile CHANGED
@@ -8,7 +8,7 @@ ENV PYTHONDONTWRITEBYTECODE=1
8
  ENV PYTHONUNBUFFERED=1
9
  WORKDIR /app
10
 
11
- RUN pip install --no-cache-dir fastapi aiohttp uvicorn pydantic requests python-dotenv
12
 
13
  COPY --chown=user ./API /app
14
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
8
  ENV PYTHONUNBUFFERED=1
9
  WORKDIR /app
10
 
11
+ RUN pip install --no-cache-dir fastapi aiohttp uvicorn pydantic requests
12
 
13
  COPY --chown=user ./API /app
14
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]