Azeez98 commited on
Commit
44fc8ec
·
verified ·
1 Parent(s): d4112a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -6
app.py CHANGED
@@ -8,6 +8,7 @@ from pydantic import BaseModel
8
  from tempfile import NamedTemporaryFile
9
  from typing import List
10
  from pydantic import BaseModel
 
11
 
12
  app = FastAPI()
13
 
@@ -17,8 +18,6 @@ class DockerImageParams(BaseModel):
17
  image_name: str
18
  tag: str = 'latest'
19
 
20
- app = FastAPI()
21
-
22
  async def stream_log(file_path):
23
  with open(file_path, 'r') as file:
24
  while True:
@@ -68,10 +67,6 @@ async def download_dependencies(requirements_file: UploadFile = File(...)):
68
  finally:
69
  os.remove(tmp_path)
70
 
71
- class DockerImageParams(BaseModel):
72
- image_name: str
73
- tag: str = 'latest'
74
-
75
  def download_docker_image(image_name, tag='latest', destination='/tmp/docker-images'):
76
  try:
77
  os.makedirs(destination, exist_ok=True)
 
8
  from tempfile import NamedTemporaryFile
9
  from typing import List
10
  from pydantic import BaseModel
11
+ from fastapi.staticfiles import StaticFiles
12
 
13
  app = FastAPI()
14
 
 
18
  image_name: str
19
  tag: str = 'latest'
20
 
 
 
21
  async def stream_log(file_path):
22
  with open(file_path, 'r') as file:
23
  while True:
 
67
  finally:
68
  os.remove(tmp_path)
69
 
 
 
 
 
70
  def download_docker_image(image_name, tag='latest', destination='/tmp/docker-images'):
71
  try:
72
  os.makedirs(destination, exist_ok=True)