Upload 6 files
Browse files- Dockerfile +33 -0
- app.py +16 -0
- requirements.txt +154 -0
- static/text.txt +1 -0
- templates/about.html +11 -0
- templates/index.html +11 -0
Dockerfile
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use the official Python image as a base image
|
2 |
+
FROM python:3.9
|
3 |
+
|
4 |
+
# Set environment variables
|
5 |
+
ENV PYTHONDONTWRITEBYTECODE 1
|
6 |
+
ENV PYTHONUNBUFFERED 1
|
7 |
+
|
8 |
+
# Set the working directory in the container
|
9 |
+
# WORKDIR /app
|
10 |
+
|
11 |
+
# Copy the dependencies file to the working directory
|
12 |
+
COPY requirements.txt .
|
13 |
+
|
14 |
+
# FROM python:3.9
|
15 |
+
|
16 |
+
WORKDIR /code
|
17 |
+
|
18 |
+
COPY ./requirements.txt /code/requirements.txt
|
19 |
+
|
20 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
21 |
+
|
22 |
+
COPY . .
|
23 |
+
|
24 |
+
# CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
25 |
+
|
26 |
+
# Copy the rest of the application code to the working directory
|
27 |
+
# COPY . .
|
28 |
+
|
29 |
+
# Expose port 5000 (the port Flask runs on)
|
30 |
+
EXPOSE 7860
|
31 |
+
|
32 |
+
# Command to run the application
|
33 |
+
CMD ["python", "app.py"]
|
app.py
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from flask import Flask, render_template
|
2 |
+
|
3 |
+
app = Flask(__name__)
|
4 |
+
|
5 |
+
@app.route('/')
|
6 |
+
def home():
|
7 |
+
return render_template('index.html')
|
8 |
+
|
9 |
+
@app.route('/about')
|
10 |
+
def about():
|
11 |
+
return render_template('about.html')
|
12 |
+
|
13 |
+
if __name__ == '__main__':
|
14 |
+
app.run(debug=True, port=7860)
|
15 |
+
|
16 |
+
|
requirements.txt
ADDED
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
aiofiles==23.2.1
|
2 |
+
altair==5.1.1
|
3 |
+
annotated-types==0.5.0
|
4 |
+
anyio==3.7.1
|
5 |
+
appnope==0.1.3
|
6 |
+
argcomplete==3.2.3
|
7 |
+
argon2-cffi==23.1.0
|
8 |
+
argon2-cffi-bindings==21.2.0
|
9 |
+
arrow==1.2.3
|
10 |
+
asgiref==3.7.2
|
11 |
+
asttokens==2.4.0
|
12 |
+
async-lru==2.0.4
|
13 |
+
attrs==23.1.0
|
14 |
+
Babel==2.12.1
|
15 |
+
backcall==0.2.0
|
16 |
+
beautifulsoup4==4.12.2
|
17 |
+
bleach==6.0.0
|
18 |
+
blinker==1.7.0
|
19 |
+
cachetools==5.3.3
|
20 |
+
certifi==2023.7.22
|
21 |
+
cffi==1.15.1
|
22 |
+
charset-normalizer==3.2.0
|
23 |
+
click==8.1.7
|
24 |
+
comm==0.1.4
|
25 |
+
contourpy==1.1.0
|
26 |
+
cycler==0.11.0
|
27 |
+
debugpy==1.8.0
|
28 |
+
decorator==5.1.1
|
29 |
+
defusedxml==0.7.1
|
30 |
+
distlib==0.3.8
|
31 |
+
Django==4.2.4
|
32 |
+
executing==1.2.0
|
33 |
+
fastapi==0.103.1
|
34 |
+
fastjsonschema==2.18.0
|
35 |
+
ffmpy==0.3.1
|
36 |
+
filelock==3.12.4
|
37 |
+
Flask==3.0.2
|
38 |
+
fonttools==4.42.1
|
39 |
+
fqdn==1.5.1
|
40 |
+
fsspec==2023.9.1
|
41 |
+
gitdb==4.0.11
|
42 |
+
GitPython==3.1.43
|
43 |
+
gradio==3.44.3
|
44 |
+
gradio_client==0.5.0
|
45 |
+
h11==0.14.0
|
46 |
+
httpcore==1.0.5
|
47 |
+
httpx==0.27.0
|
48 |
+
huggingface-hub @ git+https://github.com/huggingface/huggingface_hub@dd84cce08031a602ec0b5938c148f610b264e403
|
49 |
+
idna==3.4
|
50 |
+
importlib-resources==6.0.1
|
51 |
+
ipykernel==6.25.2
|
52 |
+
ipython==8.15.0
|
53 |
+
isoduration==20.11.0
|
54 |
+
itsdangerous==2.1.2
|
55 |
+
jedi==0.19.0
|
56 |
+
Jinja2==3.1.3
|
57 |
+
json5==0.9.14
|
58 |
+
jsonpointer==2.4
|
59 |
+
jsonschema==4.19.0
|
60 |
+
jsonschema-specifications==2023.7.1
|
61 |
+
jupyter-events==0.7.0
|
62 |
+
jupyter-lsp==2.2.0
|
63 |
+
jupyter_client==8.3.1
|
64 |
+
jupyter_core==5.3.1
|
65 |
+
jupyter_server==2.7.3
|
66 |
+
jupyter_server_terminals==0.4.4
|
67 |
+
jupyterlab==4.0.5
|
68 |
+
jupyterlab-pygments==0.2.2
|
69 |
+
jupyterlab_server==2.25.0
|
70 |
+
kiwisolver==1.4.5
|
71 |
+
markdown-it-py==3.0.0
|
72 |
+
MarkupSafe==2.1.3
|
73 |
+
matplotlib==3.8.0
|
74 |
+
matplotlib-inline==0.1.6
|
75 |
+
mdurl==0.1.2
|
76 |
+
mistune==3.0.1
|
77 |
+
nbclient==0.7.4
|
78 |
+
nbconvert==7.8.0
|
79 |
+
nbformat==5.9.2
|
80 |
+
nest-asyncio==1.5.7
|
81 |
+
notebook==7.0.3
|
82 |
+
notebook_shim==0.2.3
|
83 |
+
numpy==1.25.2
|
84 |
+
ollama==0.1.8
|
85 |
+
orjson==3.9.7
|
86 |
+
overrides==7.4.0
|
87 |
+
packaging==23.1
|
88 |
+
pandas==2.1.0
|
89 |
+
pandocfilters==1.5.0
|
90 |
+
parso==0.8.3
|
91 |
+
pexpect==4.8.0
|
92 |
+
pickleshare==0.7.5
|
93 |
+
Pillow==10.0.1
|
94 |
+
pipx==1.5.0
|
95 |
+
platformdirs==3.10.0
|
96 |
+
prometheus-client==0.17.1
|
97 |
+
prompt-toolkit==3.0.39
|
98 |
+
protobuf==4.25.3
|
99 |
+
psutil==5.9.5
|
100 |
+
ptyprocess==0.7.0
|
101 |
+
pure-eval==0.2.2
|
102 |
+
pyarrow==15.0.2
|
103 |
+
pycparser==2.21
|
104 |
+
pydantic==2.3.0
|
105 |
+
pydantic_core==2.6.3
|
106 |
+
pydeck==0.8.1b0
|
107 |
+
pydub==0.25.1
|
108 |
+
Pygments==2.16.1
|
109 |
+
pyparsing==3.1.1
|
110 |
+
python-dateutil==2.8.2
|
111 |
+
python-json-logger==2.0.7
|
112 |
+
python-multipart==0.0.6
|
113 |
+
python-telegram-bot==20.6
|
114 |
+
pytz==2023.3.post1
|
115 |
+
PyYAML==6.0.1
|
116 |
+
pyzmq==25.1.1
|
117 |
+
referencing==0.30.2
|
118 |
+
requests==2.31.0
|
119 |
+
rfc3339-validator==0.1.4
|
120 |
+
rfc3986-validator==0.1.1
|
121 |
+
rich==13.7.1
|
122 |
+
rpds-py==0.10.3
|
123 |
+
semantic-version==2.10.0
|
124 |
+
Send2Trash==1.8.2
|
125 |
+
six==1.16.0
|
126 |
+
smmap==5.0.1
|
127 |
+
sniffio==1.3.0
|
128 |
+
soupsieve==2.5
|
129 |
+
sqlparse==0.4.4
|
130 |
+
stack-data==0.6.2
|
131 |
+
starlette==0.27.0
|
132 |
+
streamlit==1.32.2
|
133 |
+
tenacity==8.2.3
|
134 |
+
terminado==0.17.1
|
135 |
+
tinycss2==1.2.1
|
136 |
+
toml==0.10.2
|
137 |
+
toolz==0.12.0
|
138 |
+
tornado==6.3.3
|
139 |
+
tqdm==4.66.1
|
140 |
+
traitlets==5.10.0
|
141 |
+
typing_extensions==4.7.1
|
142 |
+
tzdata==2023.3
|
143 |
+
uri-template==1.3.0
|
144 |
+
urllib3==2.2.1
|
145 |
+
userpath==1.9.2
|
146 |
+
uvicorn==0.23.2
|
147 |
+
virtualenv==20.25.1
|
148 |
+
voila==0.5.3
|
149 |
+
wcwidth==0.2.6
|
150 |
+
webcolors==1.13
|
151 |
+
webencodings==0.5.1
|
152 |
+
websocket-client==1.6.3
|
153 |
+
websockets==11.0.3
|
154 |
+
Werkzeug==3.0.2
|
static/text.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
text
|
templates/about.html
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html>
|
3 |
+
<head>
|
4 |
+
<title>About Us</title>
|
5 |
+
</head>
|
6 |
+
<body>
|
7 |
+
<h1>About Us</h1>
|
8 |
+
<p>We are a fantastic team!</p>
|
9 |
+
<a href="/">Home</a>
|
10 |
+
</body>
|
11 |
+
</html>
|
templates/index.html
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html>
|
3 |
+
<head>
|
4 |
+
<title>Home Page</title>
|
5 |
+
</head>
|
6 |
+
<body>
|
7 |
+
<h1>Welcome to the Home Page!</h1>
|
8 |
+
<p>This is a simple Flask app.</p>
|
9 |
+
<a href="/about">About Us</a>
|
10 |
+
</body>
|
11 |
+
</html>
|