Spaces:
Sleeping
Sleeping
Commit
·
17d5a8d
1
Parent(s):
462a018
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,12 +1,12 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
import numpy as np
|
| 3 |
-
from transformers import
|
| 4 |
import torch
|
| 5 |
|
| 6 |
@st.cache(allow_output_mutation=True)
|
| 7 |
def get_model():
|
| 8 |
-
tokenizer =
|
| 9 |
-
model =
|
| 10 |
return tokenizer,model
|
| 11 |
|
| 12 |
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import numpy as np
|
| 3 |
+
from transformers import DistilBertTokenizer, TFDistilBertForSequenceClassification
|
| 4 |
import torch
|
| 5 |
|
| 6 |
@st.cache(allow_output_mutation=True)
|
| 7 |
def get_model():
|
| 8 |
+
tokenizer = DistilBertTokenizer.from_pretrained('distilbert-base-uncased')
|
| 9 |
+
model = TFDistilBertForSequenceClassification.from_pretrained("lfernandopg/Proyecto-Transformers")
|
| 10 |
return tokenizer,model
|
| 11 |
|
| 12 |
|