satish99017 commited on
Commit
52fa8c2
·
1 Parent(s): 8b299a7

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -30
app.py DELETED
@@ -1,30 +0,0 @@
1
- import streamlit as st
2
- from transformers import pipeline
3
-
4
- # distilled_student_sentiment_classifier = pipeline(
5
- # model="lxyuan/distilbert-base-multilingual-cased-sentiments-student",
6
- # return_all_scores=True
7
- # )
8
-
9
- # text = st.text_area("Enter some text:")
10
-
11
- # if text:
12
- # out = distilled_student_sentiment_classifier(text)
13
- # st.json(out)
14
-
15
- model = pipeline("sentiment-analysis")
16
- def main():
17
- st.title("Hugging Face Model Demo")
18
-
19
- # Create an input text box
20
- input_text = st.text_input("Enter your text", "")
21
-
22
- # Create a button to trigger model inference
23
- if st.button("Analyze"):
24
- # Perform inference using the loaded model
25
- result = model(input_text)
26
- st.write("Prediction:", result[0]['label'], "| Score:", result[0]['score'])
27
-
28
- if __name__ == "__main__":
29
- main()
30
-