Download app.py from Pavan99/testmodel: direct link, hf CLI and curl.
- Browser
- Download file 627 Bytes
-
https://huggingface.co/spaces/Pavan99/testmodel/resolve/main/app.py
- Command line
-
hf download hf://spaces/Pavan99/testmodel/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Pavan99/testmodel/resolve/main/app.py
627 Bytes
| #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() |