lori0330 commited on
Commit
f042920
·
verified ·
1 Parent(s): c76d12d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -15,17 +15,17 @@ def main():
15
  )
16
  painter.to('cuda')
17
 
18
- st.title("Sentiment Analysis with HuggingFace Spaces")
19
- st.write("Enter a sentence to analyze its sentiment:")
20
  user_input = st.text_input("")
21
 
22
  if user_input:
23
  result_1 = classifier(user_input)
24
  label = result_1[0]['label']
25
- st.write(f"Label of this text: {max_label}")
26
 
27
  result_2 = summarizer(user_input, max_length=100, min_length=30, do_sample=False)
28
- summary = result_2['summary_text']
29
 
30
  description = f"This is mainly about {label}: {summary}"
31
  negative_prompt = "nsfw, lowres, (bad), text, error, fewer, extra, missing, worst quality, jpeg artifacts, low quality, watermark, unfinished, displeasing, oldest, early, chromatic aberration, signature, extra digits, artistic error, username, scan, [abstract]"
 
15
  )
16
  painter.to('cuda')
17
 
18
+ st.title("Brief Report Generator")
19
+ st.write("Copy the text here:")
20
  user_input = st.text_input("")
21
 
22
  if user_input:
23
  result_1 = classifier(user_input)
24
  label = result_1[0]['label']
25
+ st.write(f"Label of this text: {label}")
26
 
27
  result_2 = summarizer(user_input, max_length=100, min_length=30, do_sample=False)
28
+ summary = result_2[0]['summary_text']
29
 
30
  description = f"This is mainly about {label}: {summary}"
31
  negative_prompt = "nsfw, lowres, (bad), text, error, fewer, extra, missing, worst quality, jpeg artifacts, low quality, watermark, unfinished, displeasing, oldest, early, chromatic aberration, signature, extra digits, artistic error, username, scan, [abstract]"