File size: 627 Bytes
9e4cb18
22b7991
9e4cb18
 
22b7991
b535748
825ef35
b535748
 
3c1134d
b535748
 
 
3c1134d
b535748
 
3c1134d
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#import gradio as gr

#def greet(name):
 #   return "Hello " + name + "!!"

#gr.load("models/fathyshalaby/emailclassifier").launch()

# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-classification", model="fathyshalaby/emailclassifier")
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("fathyshalaby/emailclassifier")
model = AutoModelForSequenceClassification.from_pretrained("fathyshalaby/emailclassifier")
#iface = gr.Interface(fn=greet, inputs="text", outputs="text")
#iface.launch()