Cesare01 commited on
Commit
ab98dd8
·
verified ·
1 Parent(s): 1ebba44

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -14
app.py CHANGED
@@ -1,15 +1,5 @@
 
 
1
 
2
- git lfs install
3
- git clone git@hf.co:<git clone https://huggingface.co/neuraly/bert-base-italian-cased-sentiment> # example: git clone [email protected]:bigscience/bloom
4
- import gradio as gr
5
-
6
- def greet(name):
7
- return "Hello " + name + "!!"
8
-
9
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
10
- iface.launch()
11
-
12
-
13
- git add app.py
14
- git commit -m "Add application file"
15
- git push
 
1
+ # Load model directly
2
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
3
 
4
+ tokenizer = AutoTokenizer.from_pretrained("neuraly/bert-base-italian-cased-sentiment")
5
+ model = AutoModelForSequenceClassification.from_pretrained("neuraly/bert-base-italian-cased-sentiment")