Spaces:
Sleeping
Sleeping
Commit Β·
ebb67ec
1
Parent(s): 095fe6b
test app_simple_stream
Browse files- Dockerfile +2 -2
- app_hello_world/test.py +4 -0
- app_simple_stream/{callbacks.py β app/callbacks.py} +1 -1
- app_simple_stream/{chains.py β app/chains.py} +1 -1
- app_simple_stream/{crud.py β app/crud.py} +1 -1
- app_simple_stream/{data_indexing.py β app/data_indexing.py} +0 -0
- app_simple_stream/{database.py β app/database.py} +0 -0
- app_simple_stream/{app.py β app/main.py} +1 -1
- app_simple_stream/{models.py β app/models.py} +0 -0
- app_simple_stream/{prompts.py β app/prompts.py} +0 -0
- app_simple_stream/{schemas.py β app/schemas.py} +0 -0
- test.py β app_simple_stream/test.py +0 -0
Dockerfile
CHANGED
|
@@ -9,11 +9,11 @@ ENV PATH="/home/user/.local/bin:$PATH"
|
|
| 9 |
WORKDIR /app
|
| 10 |
# Copy the requirements.txt file from the host to the container
|
| 11 |
# The --chown=user ensures the copied file is owned by our 'user'
|
| 12 |
-
COPY --chown=user ./
|
| 13 |
# Install the Python dependencies listed in requirements.txt
|
| 14 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 15 |
# Copy the rest of the application code from the host to the container
|
| 16 |
# Again, ensure the copied files are owned by 'user'
|
| 17 |
-
COPY --chown=user ./
|
| 18 |
# Specify the command to run when the container starts
|
| 19 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 9 |
WORKDIR /app
|
| 10 |
# Copy the requirements.txt file from the host to the container
|
| 11 |
# The --chown=user ensures the copied file is owned by our 'user'
|
| 12 |
+
COPY --chown=user ./app_simple_stream/requirements.txt requirements.txt
|
| 13 |
# Install the Python dependencies listed in requirements.txt
|
| 14 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 15 |
# Copy the rest of the application code from the host to the container
|
| 16 |
# Again, ensure the copied files are owned by 'user'
|
| 17 |
+
COPY --chown=user ./app_simple_stream/app/* /app
|
| 18 |
# Specify the command to run when the container starts
|
| 19 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
app_hello_world/test.py
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
url = "https://simafarazi-backend-c.hf.space"
|
| 3 |
+
response = requests.get(url)
|
| 4 |
+
print(response.json()['Hello'])
|
app_simple_stream/{callbacks.py β app/callbacks.py}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
from typing import Dict, Any, List
|
| 2 |
from langchain_core.callbacks import BaseCallbackHandler
|
| 3 |
-
import schemas
|
| 4 |
import crud
|
| 5 |
|
| 6 |
|
|
|
|
| 1 |
from typing import Dict, Any, List
|
| 2 |
from langchain_core.callbacks import BaseCallbackHandler
|
| 3 |
+
import Backend_c.app_simple_stream.app.schemas as schemas
|
| 4 |
import crud
|
| 5 |
|
| 6 |
|
app_simple_stream/{chains.py β app/chains.py}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import os
|
| 2 |
from langchain_huggingface import HuggingFaceEndpoint
|
| 3 |
from langchain_core.runnables import RunnablePassthrough
|
| 4 |
-
import schemas
|
| 5 |
from prompts import (
|
| 6 |
raw_prompt,
|
| 7 |
#format_context,
|
|
|
|
| 1 |
import os
|
| 2 |
from langchain_huggingface import HuggingFaceEndpoint
|
| 3 |
from langchain_core.runnables import RunnablePassthrough
|
| 4 |
+
import Backend_c.app_simple_stream.app.schemas as schemas
|
| 5 |
from prompts import (
|
| 6 |
raw_prompt,
|
| 7 |
#format_context,
|
app_simple_stream/{crud.py β app/crud.py}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
from sqlalchemy.orm import Session
|
| 2 |
-
import models, schemas
|
| 3 |
|
| 4 |
|
| 5 |
def get_or_create_user(db: Session, username: str):
|
|
|
|
| 1 |
from sqlalchemy.orm import Session
|
| 2 |
+
import models, Backend_c.app_simple_stream.app.schemas as schemas
|
| 3 |
|
| 4 |
|
| 5 |
def get_or_create_user(db: Session, username: str):
|
app_simple_stream/{data_indexing.py β app/data_indexing.py}
RENAMED
|
File without changes
|
app_simple_stream/{database.py β app/database.py}
RENAMED
|
File without changes
|
app_simple_stream/{app.py β app/main.py}
RENAMED
|
@@ -6,7 +6,7 @@ from langserve.serialization import WellKnownLCSerializer
|
|
| 6 |
from typing import List
|
| 7 |
from sqlalchemy.orm import Session
|
| 8 |
|
| 9 |
-
import schemas
|
| 10 |
from chains import simple_chain
|
| 11 |
#import crud, models, schemas
|
| 12 |
from database import SessionLocal, engine
|
|
|
|
| 6 |
from typing import List
|
| 7 |
from sqlalchemy.orm import Session
|
| 8 |
|
| 9 |
+
import Backend_c.app_simple_stream.app.schemas as schemas
|
| 10 |
from chains import simple_chain
|
| 11 |
#import crud, models, schemas
|
| 12 |
from database import SessionLocal, engine
|
app_simple_stream/{models.py β app/models.py}
RENAMED
|
File without changes
|
app_simple_stream/{prompts.py β app/prompts.py}
RENAMED
|
File without changes
|
app_simple_stream/{schemas.py β app/schemas.py}
RENAMED
|
File without changes
|
test.py β app_simple_stream/test.py
RENAMED
|
File without changes
|