tdnathmlenthusiast
commited on
Commit
•
71ec65b
1
Parent(s):
1b324dd
Update app.py
Browse files
app.py
CHANGED
@@ -35,11 +35,8 @@ def classify_courses_genre(description):
|
|
35 |
probs = torch.sigmoid(logits)[0]
|
36 |
return dict(zip(genres, map(float, probs)))
|
37 |
|
38 |
-
# Define the output label with the top 5 classes
|
39 |
-
label = gr.outputs.Label(num_top_classes=5)
|
40 |
-
|
41 |
# Create the Gradio interface
|
42 |
-
iface = gr.Interface(fn=classify_courses_genre, inputs="text", outputs=
|
43 |
|
44 |
# Launch the Gradio interface
|
45 |
-
iface.launch(inline=False
|
|
|
35 |
probs = torch.sigmoid(logits)[0]
|
36 |
return dict(zip(genres, map(float, probs)))
|
37 |
|
|
|
|
|
|
|
38 |
# Create the Gradio interface
|
39 |
+
iface = gr.Interface(fn=classify_courses_genre, inputs="text", outputs=gr.components.Label(num_top_classes=5))
|
40 |
|
41 |
# Launch the Gradio interface
|
42 |
+
iface.launch(inline=False)
|