Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,14 @@ from datasets import load_dataset
|
|
6 |
import pandas as pd
|
7 |
|
8 |
st.set_page_config(layout="wide")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
# Veriyi yükleme ve ön işleme
|
11 |
@st.cache_resource
|
|
|
6 |
import pandas as pd
|
7 |
|
8 |
st.set_page_config(layout="wide")
|
9 |
+
from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
|
10 |
+
|
11 |
+
model_checkpoint = "model_checkpoint" # PyTorch tabanlı model yolunu buraya ekleyin
|
12 |
+
model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint)
|
13 |
+
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
|
14 |
+
|
15 |
+
sentiment_pipeline = pipeline('sentiment-analysis', model=model, tokenizer=tokenizer)
|
16 |
+
|
17 |
|
18 |
# Veriyi yükleme ve ön işleme
|
19 |
@st.cache_resource
|