Spaces:
Sleeping
Sleeping
Commit
·
7d1128f
1
Parent(s):
b8e76cf
Update app.py
Browse files
app.py
CHANGED
|
@@ -70,4 +70,21 @@ description="Просто перетащи нужное фото и я проб
|
|
| 70 |
examples=[['cat2.jpg'],['catonnx.jpg'],['popugai.jpg'],['cat3.jpeg']]
|
| 71 |
|
| 72 |
|
| 73 |
-
gr.Interface(inference,gr.inputs.Image(type="filepath"),"label",title=title,description=description,examples=examples).launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
examples=[['cat2.jpg'],['catonnx.jpg'],['popugai.jpg'],['cat3.jpeg']]
|
| 71 |
|
| 72 |
|
| 73 |
+
gr.Interface(inference,gr.inputs.Image(type="filepath"),"label",title=title,description=description,examples=examples).launch()
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
from typing import Union
|
| 77 |
+
|
| 78 |
+
from fastapi import FastAPI
|
| 79 |
+
|
| 80 |
+
app = FastAPI()
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
@app.get("/")
|
| 84 |
+
def read_root():
|
| 85 |
+
return {"Hello": "World"}
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
@app.get("/items/{item_id}")
|
| 89 |
+
def read_item(item_id: int, q: Union[str, None] = None):
|
| 90 |
+
return {"item_id": item_id, "q": q}
|