FrancoisHB commited on
Commit
9f27a52
1 Parent(s): 624b7b6

Commit Test SRT

Browse files
Files changed (1) hide show
  1. app.py +5 -12
app.py CHANGED
@@ -1,15 +1,8 @@
 
1
  from transformers import pipeline
2
 
3
- def summarize_text(input_text, max_length=100):
4
- summarizer = pipeline("summarization")
5
- summary = summarizer(input_text, max_length=max_length)
6
- return summary[0]['summary_text']
7
 
8
- def main():
9
- input_text = input("Enter the text to summarize: ")
10
- summary = summarize_text(input_text)
11
- print("Summary:")
12
- print(summary)
13
-
14
- if __name__ == "__main__":
15
- main()
 
1
+ import streamlit as st
2
  from transformers import pipeline
3
 
4
+ pipe = pipeline('sentiment-analysis')
5
+ text = st.text_area('enter some text:')
 
 
6
 
7
+ if text:
8
+ out = pipe()