add g4f
Browse files- Dockerfile +7 -0
- README.md +1 -0
- app.py +4 -0
Dockerfile
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
+
WORKDIR /app
|
| 3 |
+
COPY . /app
|
| 4 |
+
|
| 5 |
+
RUN pip install --no-cache-dir --upgrade g4f[all]
|
| 6 |
+
EXPOSE 1337
|
| 7 |
+
CMD ["python", "/app/app.py"]
|
README.md
CHANGED
|
@@ -7,6 +7,7 @@ sdk: docker
|
|
| 7 |
pinned: false
|
| 8 |
license: mit
|
| 9 |
short_description: gpt4free inference API
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 7 |
pinned: false
|
| 8 |
license: mit
|
| 9 |
short_description: gpt4free inference API
|
| 10 |
+
app_port: 1337
|
| 11 |
---
|
| 12 |
|
| 13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
app.py
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from g4f.api import run_api
|
| 2 |
+
|
| 3 |
+
if __name__ == '__main__':
|
| 4 |
+
run_api()
|