Spaces:
Sleeping
Sleeping
deploy at 2024-08-24 14:36:12.725324
Browse files- Dockerfile +10 -0
- main.py +14 -0
- model.pkl +3 -0
- requirements.txt +2 -0
Dockerfile
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.10
|
2 |
+
WORKDIR /code
|
3 |
+
COPY --link --chown=1000 . .
|
4 |
+
RUN mkdir -p /tmp/cache/
|
5 |
+
RUN chmod a+rwx -R /tmp/cache/
|
6 |
+
ENV HF_HUB_CACHE=HF_HOME
|
7 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
8 |
+
|
9 |
+
ENV PYTHONUNBUFFERED=1 PORT=7860
|
10 |
+
CMD ["python", "main.py"]
|
main.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from fasthtml_hf import setup_hf_backup
|
2 |
+
from fasthtml.common import *
|
3 |
+
#from fastai.vision.all import *
|
4 |
+
#import io
|
5 |
+
#import base64
|
6 |
+
|
7 |
+
|
8 |
+
app,rt = fast_app()
|
9 |
+
|
10 |
+
@rt('/')
|
11 |
+
def get(): return Div(P('Hello World!'), hx_get="/change")
|
12 |
+
|
13 |
+
setup_hf_backup(app)
|
14 |
+
serve()
|
model.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:04a212a1709f207d4f3c33a3ccd17d891df6917fe1ec1d7b0c1c918579b67df3
|
3 |
+
size 89750534
|
requirements.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
python-fasthtml
|
2 |
+
fasthtml-hf
|