Spaces:
Sleeping
Sleeping
change origin
Browse files- Dockerfile +4 -4
- app.py +1 -1
- compose.yml +0 -0
Dockerfile
CHANGED
@@ -1,16 +1,16 @@
|
|
1 |
# Use the official Python 3.10.9 image
|
2 |
FROM python:3.12.1
|
3 |
|
|
|
|
|
4 |
# Copy the current directory contents into the container at .
|
5 |
COPY . .
|
6 |
|
7 |
-
# Set the working directory to /
|
8 |
-
WORKDIR /
|
9 |
|
10 |
# Install requirements.txt
|
11 |
-
RUN pip install
|
12 |
-
|
13 |
|
|
|
14 |
|
15 |
# Start the FastAPI app on port 7860, the default port expected by Spaces
|
16 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
# Use the official Python 3.10.9 image
|
2 |
FROM python:3.12.1
|
3 |
|
4 |
+
WORKDIR /app
|
5 |
+
|
6 |
# Copy the current directory contents into the container at .
|
7 |
COPY . .
|
8 |
|
|
|
|
|
9 |
|
10 |
# Install requirements.txt
|
11 |
+
RUN pip install -r requirements.txt
|
|
|
12 |
|
13 |
+
EXPOSE 7860
|
14 |
|
15 |
# Start the FastAPI app on port 7860, the default port expected by Spaces
|
16 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
app.py
CHANGED
@@ -7,7 +7,7 @@ from routers import get_transcript
|
|
7 |
|
8 |
app = FastAPI()
|
9 |
|
10 |
-
app.add_middleware(CORSMiddleware, allow_origins=["
|
11 |
|
12 |
app.include_router(get_transcript.router)
|
13 |
|
|
|
7 |
|
8 |
app = FastAPI()
|
9 |
|
10 |
+
app.add_middleware(CORSMiddleware, allow_origins=["*"], allow_credentials=True, allow_methods=["*"], allow_headers=["Content-Type", "Authorization", "x-api-key"])
|
11 |
|
12 |
app.include_router(get_transcript.router)
|
13 |
|
compose.yml
ADDED
File without changes
|