Spaces:
Runtime error
Runtime error
Commit ·
e3758a0
1
Parent(s): 1c6187e
Update main.py
Browse files
main.py
CHANGED
|
@@ -3,7 +3,8 @@ from pydantic import BaseModel
|
|
| 3 |
from typing import List
|
| 4 |
|
| 5 |
class Item(BaseModel):
|
| 6 |
-
|
|
|
|
| 7 |
|
| 8 |
app = FastAPI()
|
| 9 |
|
|
@@ -11,6 +12,10 @@ app = FastAPI()
|
|
| 11 |
def read_root():
|
| 12 |
return {"Hello": "World!"}
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
@app.put("/")
|
| 15 |
def predict(Item):
|
| 16 |
# Load the OpenAI CLIP Model
|
|
|
|
| 3 |
from typing import List
|
| 4 |
|
| 5 |
class Item(BaseModel):
|
| 6 |
+
name: str
|
| 7 |
+
image1: bytes
|
| 8 |
|
| 9 |
app = FastAPI()
|
| 10 |
|
|
|
|
| 12 |
def read_root():
|
| 13 |
return {"Hello": "World!"}
|
| 14 |
|
| 15 |
+
@app.put("/return/")
|
| 16 |
+
def return_item(item: Item):
|
| 17 |
+
return item
|
| 18 |
+
|
| 19 |
@app.put("/")
|
| 20 |
def predict(Item):
|
| 21 |
# Load the OpenAI CLIP Model
|