mvaloatto commited on
Commit
fc2bafd
·
1 Parent(s): 1ed0e61

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
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"),