Rahul-8853 commited on
Commit
16f7162
1 Parent(s): 5ce8901

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -15
app.py DELETED
@@ -1,15 +0,0 @@
1
- import streamlit as st
2
- from transformers import BertTokenizer, BertForSequenceClassification
3
- import torch
4
-
5
- # Load model and tokenizer
6
- tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
7
- model = BertForSequenceClassification.from_pretrained('RAKUGenie/autotrain-g260y-aiz48')
8
-
9
- st.title("Sentiment Analysis")
10
- text = st.text_input("Enter text:")
11
- if text:
12
- inputs = tokenizer(text, return_tensors='pt')
13
- outputs = model(**inputs)
14
- prediction = torch.argmax(outputs.logits).item()
15
- st.write(f"Prediction: {prediction}")