Spaces:
Sleeping
Sleeping
Commit
·
ff281a7
1
Parent(s):
e5f0dd4
many files
Browse files- .DS_Store +0 -0
- .gitignore +78 -0
- Dockerfile +8 -10
- app.py +1 -0
- requirements.txt +1 -1
.DS_Store
DELETED
|
Binary file (6.15 kB)
|
|
|
.gitignore
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Byte-compiled / optimized / DLL files
|
| 2 |
+
__pycache__/
|
| 3 |
+
*.py[cod]
|
| 4 |
+
*$py.class
|
| 5 |
+
|
| 6 |
+
# C extensions
|
| 7 |
+
*.so
|
| 8 |
+
|
| 9 |
+
# Environment variables
|
| 10 |
+
.env
|
| 11 |
+
|
| 12 |
+
# Logs
|
| 13 |
+
*.log
|
| 14 |
+
logs/
|
| 15 |
+
|
| 16 |
+
# Virtual environment
|
| 17 |
+
venv/
|
| 18 |
+
env/
|
| 19 |
+
*.venv
|
| 20 |
+
*.env/
|
| 21 |
+
|
| 22 |
+
# Dependency directories
|
| 23 |
+
pip-wheel-metadata/
|
| 24 |
+
*.egg-info/
|
| 25 |
+
.dist-info/
|
| 26 |
+
.Python
|
| 27 |
+
node_modules/
|
| 28 |
+
|
| 29 |
+
# Operating system files
|
| 30 |
+
.DS_Store
|
| 31 |
+
Thumbs.db
|
| 32 |
+
|
| 33 |
+
# Database files
|
| 34 |
+
# *.sqlite3
|
| 35 |
+
*.db
|
| 36 |
+
|
| 37 |
+
# ChromaDB files
|
| 38 |
+
chroma/
|
| 39 |
+
*.chroma
|
| 40 |
+
# chroma.sqlite3
|
| 41 |
+
|
| 42 |
+
# Hugging Face Spaces large files
|
| 43 |
+
.git-lfs*
|
| 44 |
+
|
| 45 |
+
# Temporary files
|
| 46 |
+
*.bak
|
| 47 |
+
*.swp
|
| 48 |
+
*.tmp
|
| 49 |
+
|
| 50 |
+
# IDE and editor settings
|
| 51 |
+
.idea/
|
| 52 |
+
.vscode/
|
| 53 |
+
*.code-workspace
|
| 54 |
+
|
| 55 |
+
# Jupyter Notebook checkpoints
|
| 56 |
+
.ipynb_checkpoints/
|
| 57 |
+
|
| 58 |
+
# Build artifacts
|
| 59 |
+
build/
|
| 60 |
+
dist/
|
| 61 |
+
*.egg
|
| 62 |
+
*.whl
|
| 63 |
+
|
| 64 |
+
# Coverage reports
|
| 65 |
+
htmlcov/
|
| 66 |
+
.coverage
|
| 67 |
+
.tox/
|
| 68 |
+
.cache/
|
| 69 |
+
|
| 70 |
+
# Deployment files
|
| 71 |
+
*.pid
|
| 72 |
+
*.lock
|
| 73 |
+
*.sock
|
| 74 |
+
|
| 75 |
+
# Ignore any large files not tracked by Git LFS
|
| 76 |
+
!*.lfs
|
| 77 |
+
|
| 78 |
+
.env
|
Dockerfile
CHANGED
|
@@ -8,25 +8,23 @@ RUN useradd -m -u 1000 user
|
|
| 8 |
USER user
|
| 9 |
|
| 10 |
# Set home to the user's home directory
|
| 11 |
-
ENV
|
| 12 |
-
PATH=/home/user/.local/bin:$PATH
|
| 13 |
|
| 14 |
# Set the working directory to the user's home directory
|
| 15 |
-
WORKDIR
|
| 16 |
# Set the working directory
|
| 17 |
# WORKDIR /app
|
| 18 |
|
| 19 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
| 20 |
-
COPY --chown=user .
|
| 21 |
-
|
| 22 |
-
# Copy project files to the container
|
| 23 |
-
# COPY . /app
|
| 24 |
|
| 25 |
# Install dependencies
|
| 26 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 27 |
|
| 28 |
# Expose the default FastAPI port
|
| 29 |
-
EXPOSE 8000
|
|
|
|
| 30 |
|
| 31 |
# Command to run FastAPI with Uvicorn
|
| 32 |
-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
|
|
|
|
|
|
| 8 |
USER user
|
| 9 |
|
| 10 |
# Set home to the user's home directory
|
| 11 |
+
ENV PATH="/home/user/.local/bin:$PATH"
|
|
|
|
| 12 |
|
| 13 |
# Set the working directory to the user's home directory
|
| 14 |
+
WORKDIR /app
|
| 15 |
# Set the working directory
|
| 16 |
# WORKDIR /app
|
| 17 |
|
| 18 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
| 19 |
+
COPY --chown=user ./requirements.txt requirements.txt
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
# Install dependencies
|
| 22 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 23 |
|
| 24 |
# Expose the default FastAPI port
|
| 25 |
+
# EXPOSE 8000
|
| 26 |
+
COPY --chown=user . /app
|
| 27 |
|
| 28 |
# Command to run FastAPI with Uvicorn
|
| 29 |
+
# CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
|
| 30 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
app.py
CHANGED
|
@@ -91,5 +91,6 @@ async def invite(user_input_message: str = Form(...)):
|
|
| 91 |
|
| 92 |
# Run the application
|
| 93 |
# if __name__ == '__main__':
|
|
|
|
| 94 |
# import uvicorn
|
| 95 |
# uvicorn.run(app, host="0.0.0.0", port=8000, debug=True)
|
|
|
|
| 91 |
|
| 92 |
# Run the application
|
| 93 |
# if __name__ == '__main__':
|
| 94 |
+
# main()
|
| 95 |
# import uvicorn
|
| 96 |
# uvicorn.run(app, host="0.0.0.0", port=8000, debug=True)
|
requirements.txt
CHANGED
|
@@ -3,7 +3,7 @@ google.generativeai
|
|
| 3 |
pandas
|
| 4 |
numpy
|
| 5 |
fastapi
|
| 6 |
-
uvicorn
|
| 7 |
jinja2
|
| 8 |
python-multipart
|
| 9 |
sentence_transformers
|
|
|
|
| 3 |
pandas
|
| 4 |
numpy
|
| 5 |
fastapi
|
| 6 |
+
uvicorn[standard]
|
| 7 |
jinja2
|
| 8 |
python-multipart
|
| 9 |
sentence_transformers
|