Spaces:
Sleeping
Sleeping
Download main.py from thesis-sd3a/digital-art-api: direct link, hf CLI and curl.
- Browser
- Download file 666 Bytes
-
https://huggingface.co/spaces/thesis-sd3a/digital-art-api/resolve/main/main.py
- Command line
-
hf download hf://spaces/thesis-sd3a/digital-art-api/main.py
-
curl -L -o main.py https://huggingface.co/spaces/thesis-sd3a/digital-art-api/resolve/main/main.py
666 Bytes
| from fastapi import FastAPI | |
| from starlette.middleware.cors import CORSMiddleware | |
| from router import router | |
| app = FastAPI( | |
| title="Thesis Intelligent System Module", | |
| version="1.1.1", | |
| description="Image Plagiarism Checker and Image Classification API for the Intellectual Property Rights Management System using Perceptual Hashing Algorithms", | |
| ) | |
| # configure CORS middleware | |
| app.add_middleware( | |
| CORSMiddleware, | |
| allow_credentials=True, | |
| allow_methods=["*"], | |
| allow_headers=["*"], | |
| allow_origins=["https://artforgelab.vercel.app", "https://thesis-web-ix3hpczsc-mendozaruzzel103-6330s-projects.vercel.app"], | |
| ) | |
| app.include_router(router) | |