Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,6 +9,13 @@ def predict(image):
|
|
9 |
predictions = pipeline(image)
|
10 |
return {p["label"]: p["score"] for p in predictions}
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
gr.Interface(
|
13 |
predict,
|
14 |
inputs=gr.inputs.Image(label="Upload hot dog candidate", type="filepath"),
|
|
|
9 |
predictions = pipeline(image)
|
10 |
return {p["label"]: p["score"] for p in predictions}
|
11 |
|
12 |
+
window.addEventListener('load', function () {
|
13 |
+
gradioURL = window.location.href
|
14 |
+
if (!gradioURL.endsWith('?__theme=dark')) {
|
15 |
+
window.location.replace(gradioURL + '?__theme=dark');
|
16 |
+
}
|
17 |
+
});
|
18 |
+
|
19 |
gr.Interface(
|
20 |
predict,
|
21 |
inputs=gr.inputs.Image(label="Upload hot dog candidate", type="filepath"),
|