Spaces:
Sleeping
Sleeping
André Oriani commited on
Commit ·
765d6e2
1
Parent(s): 204471d
Prep for huggingface
Browse files- Dockerfile +11 -0
- chainlit.py → app.py +1 -1
- main.py +0 -2
Dockerfile
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.9.6
|
| 2 |
+
RUN useradd -m -u 1000 user
|
| 3 |
+
USER user
|
| 4 |
+
ENV HOME=/home/user \
|
| 5 |
+
PATH=/home/user/.local/bin:$PATH
|
| 6 |
+
WORKDIR $HOME/app
|
| 7 |
+
COPY --chown=user . $HOME/app
|
| 8 |
+
COPY ./requirements.txt ~/app/requirements.txt
|
| 9 |
+
RUN pip install -r requirements.txt
|
| 10 |
+
COPY . .
|
| 11 |
+
CMD ["chainlit", "run", "app.py", "--port", "7860"]
|
chainlit.py → app.py
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import
|
| 2 |
from main import async_run_crew
|
| 3 |
|
| 4 |
|
|
|
|
| 1 |
+
import app as cl
|
| 2 |
from main import async_run_crew
|
| 3 |
|
| 4 |
|
main.py
CHANGED
|
@@ -8,8 +8,6 @@ import asyncio
|
|
| 8 |
from concurrent.futures import ThreadPoolExecutor
|
| 9 |
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
class Step(BaseModel):
|
| 14 |
text: str = Field(description="The text for the step")
|
| 15 |
img_link: str = Field(description="The link for the generated illustration")
|
|
|
|
| 8 |
from concurrent.futures import ThreadPoolExecutor
|
| 9 |
|
| 10 |
|
|
|
|
|
|
|
| 11 |
class Step(BaseModel):
|
| 12 |
text: str = Field(description="The text for the step")
|
| 13 |
img_link: str = Field(description="The link for the generated illustration")
|