Tazin commited on
Commit
29e2616
·
1 Parent(s): f3edf3e

added examples

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -21,7 +21,15 @@ def imdb_genre(description):
21
  probs = torch.sigmoid(logits)[0]
22
  return dict(zip(genres, map(float, probs)))
23
 
 
 
 
 
 
 
 
 
24
  label = gr.outputs.Label(num_top_classes=5)
25
- iface = gr.Interface(fn=imdb_genre, inputs="text", outputs=label)
26
  iface.launch(inline=False)
27
 
 
21
  probs = torch.sigmoid(logits)[0]
22
  return dict(zip(genres, map(float, probs)))
23
 
24
+ examples = [
25
+ 'Two years of nights have turned Bruce Wayne into a nocturnal animal. But as he continues to find his way as Gothams dark knight Bruce is forced into a game of cat and mouse with his biggest threat so far, a manic killer known as "The Riddler" who is filled with rage and determined to expose the corrupt system whilst picking off all of Gothams key political figures',
26
+ 'Enter the relentless pressure of a restaurant kitchen as a head chef wrangles his team on the busiest day of the year.',
27
+ 'At a fading vacation resort, 11-year-old Sophie treasures rare time together with her loving and idealistic father, Calum (Paul Mescal). As a world of adolescence creeps into view, beyond her eye Calum struggles under the weight of life outside of fatherhood'
28
+
29
+ ]
30
+
31
+
32
  label = gr.outputs.Label(num_top_classes=5)
33
+ iface = gr.Interface(fn=imdb_genre, inputs="text", outputs=label, examples = examples)
34
  iface.launch(inline=False)
35