JKJanosko commited on
Commit
8979690
·
unverified ·
1 Parent(s): eaaecec

Delete app.py

Browse files
Files changed (1) hide show
  1. MS2/app.py +0 -27
MS2/app.py DELETED
@@ -1,27 +0,0 @@
1
- import streamlit as st
2
- from transformers import pipeline
3
- import torch
4
- import torch.nn.functional as F
5
-
6
- def main():
7
-
8
- models = ["distilbert-base-uncased-finetuned-sst-2-english","cardiffnlp/twitter-roberta-base-sentiment","finiteautomata/bertweet-base-sentiment-analysis","papluca/xlm-roberta-base-language-detection","cardiffnlp/twitter-roberta-base-sentiment-latest","yiyanghkust/finbert-tone","ProsusAI/finbert","j-hartmann/emotion-english-distilroberta-base"]
9
-
10
- st.title("Streamlit Sentiment Analysis App ")
11
- st.header("Sentiments analysis using Trnasformers by 🤗")
12
- st.header("Jozef Janosko - CS 482, Milestone 2")
13
-
14
- st.text("Input a test string for sentiment analysis.")
15
- input=st.text_input("input string")
16
- model = st.selectbox("Select Model...", models)
17
- st.text("Result using "+model+": ")
18
- st.text(str(sentiment_Analysis(input,model)))
19
-
20
- def sentiment_Analysis(input, model):
21
-
22
- classifier = pipeline("sentiment-analysis",model)
23
- ret=classifier(input)
24
- return ret
25
-
26
- if __name__ == '__main__' :
27
- main()