Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -18,6 +18,10 @@ img_processor = AutoImageProcessor.from_pretrained(img_model_id)
|
|
| 18 |
img_model = AutoModel.from_pretrained(img_model_id)
|
| 19 |
img_model.eval()
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
@app.post("/embed/image")
|
| 22 |
async def embed_image(request: ImageRequest):
|
| 23 |
try:
|
|
|
|
| 18 |
img_model = AutoModel.from_pretrained(img_model_id)
|
| 19 |
img_model.eval()
|
| 20 |
|
| 21 |
+
@app.get("/")
|
| 22 |
+
def home():
|
| 23 |
+
return {"status": "online", "model": img_model_id, "endpoint": "/embed/image"}
|
| 24 |
+
|
| 25 |
@app.post("/embed/image")
|
| 26 |
async def embed_image(request: ImageRequest):
|
| 27 |
try:
|