Commit
·
3442849
1
Parent(s):
a4672e3
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import requests
|
|
|
|
| 2 |
|
| 3 |
API_URL = "https://api-inference.huggingface.co/models/facebook/detr-resnet-50-panoptic"
|
| 4 |
headers = {"Authorization": "Bearer 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"}
|
|
@@ -9,4 +10,5 @@ def query(filename):
|
|
| 9 |
response = requests.post(API_URL, headers=headers, data=data)
|
| 10 |
return response.json()
|
| 11 |
|
|
|
|
| 12 |
output = query("09_truck.jpg")
|
|
|
|
| 1 |
import requests
|
| 2 |
+
import os
|
| 3 |
|
| 4 |
API_URL = "https://api-inference.huggingface.co/models/facebook/detr-resnet-50-panoptic"
|
| 5 |
headers = {"Authorization": "Bearer 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"}
|
|
|
|
| 10 |
response = requests.post(API_URL, headers=headers, data=data)
|
| 11 |
return response.json()
|
| 12 |
|
| 13 |
+
train = os.listdir("./")
|
| 14 |
output = query("09_truck.jpg")
|