LalitMahale
commited on
Commit
·
3d9266e
1
Parent(s):
ef93b5e
push
Browse files- Dockerfile +1 -1
- app.py +0 -6
Dockerfile
CHANGED
|
@@ -11,7 +11,7 @@ COPY ./ /app
|
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
# Set environment variable for Hugging Face cache (optional but recommended)
|
| 14 |
-
ENV
|
| 15 |
|
| 16 |
# Create the cache directory and make sure it's writable
|
| 17 |
RUN mkdir -p /tmp/huggingface_cache && chmod -R 777 /tmp/huggingface_cache
|
|
|
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
# Set environment variable for Hugging Face cache (optional but recommended)
|
| 14 |
+
ENV HF_HOME=/tmp/huggingface_cache
|
| 15 |
|
| 16 |
# Create the cache directory and make sure it's writable
|
| 17 |
RUN mkdir -p /tmp/huggingface_cache && chmod -R 777 /tmp/huggingface_cache
|
app.py
CHANGED
|
@@ -18,12 +18,6 @@ app = FastAPI()
|
|
| 18 |
async def home():
|
| 19 |
return {"message": "Testing_api"}
|
| 20 |
|
| 21 |
-
import os
|
| 22 |
-
from fastapi import FastAPI, HTTPException, UploadFile, File
|
| 23 |
-
from deep_translator import GoogleTranslator
|
| 24 |
-
|
| 25 |
-
app = FastAPI()
|
| 26 |
-
|
| 27 |
# Token verification function
|
| 28 |
def verify_token(token: str):
|
| 29 |
if token != os.getenv("TOKEN"):
|
|
|
|
| 18 |
async def home():
|
| 19 |
return {"message": "Testing_api"}
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
# Token verification function
|
| 22 |
def verify_token(token: str):
|
| 23 |
if token != os.getenv("TOKEN"):
|