Ajay1311 commited on
Commit
0db809a
·
verified ·
1 Parent(s): 521ac50

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -1,3 +1,12 @@
 
1
  import gradio as gr
2
 
3
- gr.load("models/Ajay1311/phish").launch()
 
 
 
 
 
 
 
 
 
1
+ from transformers import pipeline
2
  import gradio as gr
3
 
4
+ # Manually load the model
5
+ model = pipeline('text-classification', model="Ajay1311/phish")
6
+
7
+ # Define a function for Gradio interface
8
+ def classify(text):
9
+ return model(text)
10
+
11
+ # Create the Gradio interface
12
+ gr.Interface(fn=classify, inputs="text", outputs="json").launch()