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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -4,17 +4,16 @@ from transformers import pipeline
4
  pipeline = pipeline(task="image-classification", model="julien-c/hotdog-not-hotdog")
5
 
6
 
7
-
8
- def predict(image):
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,
 
4
  pipeline = pipeline(task="image-classification", model="julien-c/hotdog-not-hotdog")
5
 
6
 
 
 
 
 
 
7
  window.addEventListener('load', function () {
8
  gradioURL = window.location.href
9
  if (!gradioURL.endsWith('?__theme=dark')) {
10
  window.location.replace(gradioURL + '?__theme=dark');
11
  }
12
+ })
13
+
14
+ def predict(image):
15
+ predictions = pipeline(image)
16
+ return {p["label"]: p["score"] for p in predictions}
17
 
18
  gr.Interface(
19
  predict,