Spaces:
Running on Zero
Running on Zero
Lord-Raven commited on
Commit ·
36c07e6
1
Parent(s): 7c9073a
Removing CORS junk.
Browse files- app.py +0 -15
- requirements.txt +0 -1
app.py
CHANGED
|
@@ -6,19 +6,6 @@ import onnxruntime
|
|
| 6 |
import time
|
| 7 |
from datetime import datetime
|
| 8 |
from transformers import pipeline
|
| 9 |
-
from fastapi import FastAPI
|
| 10 |
-
from fastapi.middleware.cors import CORSMiddleware
|
| 11 |
-
|
| 12 |
-
# CORS Config - This isn't actually working. I probably don't want this any more.
|
| 13 |
-
app = FastAPI()
|
| 14 |
-
|
| 15 |
-
app.add_middleware(
|
| 16 |
-
CORSMiddleware,
|
| 17 |
-
allow_origins=["https://statosphere-3704059fdd7e.c5v4v4jx6pq5.win","https://crunchatize-77a78ffcc6a6.c5v4v4jx6pq5.win","https://crunchatize-2-2b4f5b1479a6.c5v4v4jx6pq5.win","https://tamabotchi-2dba63df3bf1.c5v4v4jx6pq5.win","https://expressions-plus-plus-a8db5f0bd422.c5v4v4jx6pq5.win", "https://crunchatize-zero-55cf8960d31a.c5v4v4jx6pq5.win", "https://misty-mississippi-87473a288fb9.c5v4v4jx6pq5.win"],
|
| 18 |
-
allow_credentials=True,
|
| 19 |
-
allow_methods=["*"],
|
| 20 |
-
allow_headers=["*"],
|
| 21 |
-
)
|
| 22 |
|
| 23 |
print(f"Is CUDA available: {torch.cuda.is_available()}")
|
| 24 |
if torch.cuda.is_available():
|
|
@@ -74,6 +61,4 @@ gradio_interface = gradio.Interface(
|
|
| 74 |
description = "This Space is a classification service for a set of chub.ai stages and not really intended for use through this UI."
|
| 75 |
)
|
| 76 |
|
| 77 |
-
app.mount("/gradio", gradio_interface)
|
| 78 |
-
|
| 79 |
gradio_interface.launch()
|
|
|
|
| 6 |
import time
|
| 7 |
from datetime import datetime
|
| 8 |
from transformers import pipeline
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
print(f"Is CUDA available: {torch.cuda.is_available()}")
|
| 11 |
if torch.cuda.is_available():
|
|
|
|
| 61 |
description = "This Space is a classification service for a set of chub.ai stages and not really intended for use through this UI."
|
| 62 |
)
|
| 63 |
|
|
|
|
|
|
|
| 64 |
gradio_interface.launch()
|
requirements.txt
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
torch==2.11.0
|
| 2 |
-
fastapi==0.115.2
|
| 3 |
huggingface_hub==0.33.0
|
| 4 |
json5==0.9.25
|
| 5 |
numpy
|
|
|
|
| 1 |
torch==2.11.0
|
|
|
|
| 2 |
huggingface_hub==0.33.0
|
| 3 |
json5==0.9.25
|
| 4 |
numpy
|