sid_racha commited on
Commit
4a875a9
·
1 Parent(s): 1a8b923

modified main

Browse files
Files changed (3) hide show
  1. Dockerfile +1 -1
  2. app/main.py +5 -0
  3. app.py → main_app.py +0 -0
Dockerfile CHANGED
@@ -16,4 +16,4 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
16
  # Again, ensure the copied files are owned by 'user'
17
  COPY --chown=user . /app
18
  # Specify the command to run when the container starts
19
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
16
  # Again, ensure the copied files are owned by 'user'
17
  COPY --chown=user . /app
18
  # Specify the command to run when the container starts
19
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
app/main.py CHANGED
@@ -32,6 +32,11 @@ async def generate_stream(input_data: schemas.BaseModel, runnable: Runnable, cal
32
  yield {"event": "end"}
33
 
34
 
 
 
 
 
 
35
  @app.post("/simple/stream")
36
  async def simple_stream(request: Request):
37
  data = await request.json()
 
32
  yield {"event": "end"}
33
 
34
 
35
+ @app.get("/")
36
+ def greet_json():
37
+ return {"Hello": "World!"}
38
+
39
+
40
  @app.post("/simple/stream")
41
  async def simple_stream(request: Request):
42
  data = await request.json()
app.py → main_app.py RENAMED
File without changes