Wootang01 commited on
Commit
4bda66e
1 Parent(s): f7fa6eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -2,7 +2,9 @@ import streamlit as st
2
  from transformers import PegasusForConditionalGeneration, PegasusTokenizer
3
 
4
  st.title("Paraphrase with Pegasus")
5
-
 
 
6
  model_name = "tuner007/pegasus_paraphrase"
7
  torch_device = "cpu"
8
  tokenizer = PegasusTokenizer.from_pretrained(model_name)
@@ -25,7 +27,7 @@ def get_response(
25
 
26
  num_beams = 10
27
  num_return_sequences = st.slider("Number of paraphrases", 1, 10, 5, 1)
28
- context = st.text_area(label="Enter a sentence to paraphrase", max_chars=384)
29
 
30
  with st.expander("Advanced"):
31
  temperature = st.slider("Temperature", 0.1, 5.0, 1.5, 0.1)
 
2
  from transformers import PegasusForConditionalGeneration, PegasusTokenizer
3
 
4
  st.title("Paraphrase with Pegasus")
5
+ st.write("Paraphrase means to express meaning using different words. Pegasus refers to a natural language processing model.")
6
+ st.write("Write or paste text below, select a number of paraphrases and enter. The machine will attempt to produce your selected number of paraphrases.")
7
+
8
  model_name = "tuner007/pegasus_paraphrase"
9
  torch_device = "cpu"
10
  tokenizer = PegasusTokenizer.from_pretrained(model_name)
 
27
 
28
  num_beams = 10
29
  num_return_sequences = st.slider("Number of paraphrases", 1, 10, 5, 1)
30
+ context = st.text_area(label="Write or paste text", max_chars=384)
31
 
32
  with st.expander("Advanced"):
33
  temperature = st.slider("Temperature", 0.1, 5.0, 1.5, 0.1)