Spaces:
Runtime error
Runtime error
fix?
Browse files- app.py +1 -1
- requirements.txt +1 -1
app.py
CHANGED
|
@@ -6,7 +6,7 @@ detection_pipeline = pipeline("image-classification", "saltacc/anime-ai-detect")
|
|
| 6 |
|
| 7 |
def detect(img):
|
| 8 |
print(img)
|
| 9 |
-
output = detection_pipeline(img)
|
| 10 |
final = {}
|
| 11 |
for d in output:
|
| 12 |
final[d["label"]] = d["score"]
|
|
|
|
| 6 |
|
| 7 |
def detect(img):
|
| 8 |
print(img)
|
| 9 |
+
output = detection_pipeline(img, top_k=2)
|
| 10 |
final = {}
|
| 11 |
for d in output:
|
| 12 |
final[d["label"]] = d["score"]
|
requirements.txt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
--extra-index-url https://download.pytorch.org/whl/cu113
|
| 2 |
torch
|
| 3 |
-
transformers
|
|
|
|
| 1 |
--extra-index-url https://download.pytorch.org/whl/cu113
|
| 2 |
torch
|
| 3 |
+
transformers
|