Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -24,5 +24,22 @@ def classify_film_genre(description):
|
|
24 |
return dict(zip(genres, map(float, probs)))
|
25 |
|
26 |
label = gr.Label(num_top_classes=5)
|
27 |
-
iface = gr.Interface(fn=classify_film_genre,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
iface.launch(inline=False)
|
|
|
24 |
return dict(zip(genres, map(float, probs)))
|
25 |
|
26 |
label = gr.Label(num_top_classes=5)
|
27 |
+
iface = gr.Interface(fn=classify_film_genre,
|
28 |
+
inputs="text",
|
29 |
+
outputs=label,
|
30 |
+
title="Film Genre Classifer",
|
31 |
+
description=(
|
32 |
+
f"""
|
33 |
+
|
34 |
+
Instructions:
|
35 |
+
|
36 |
+
1. Copy and paste a movie plot from the internet.
|
37 |
+
2. Hit the Submit button.
|
38 |
+
|
39 |
+
Note: There are a total of 27 Genres to classify
|
40 |
+
|
41 |
+
|
42 |
+
"""
|
43 |
+
)
|
44 |
+
)
|
45 |
iface.launch(inline=False)
|