Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,20 @@ ttokenizer = AutoTokenizer.from_pretrained("./")
|
|
| 7 |
tmodel = T5ForConditionalGeneration.from_pretrained('./')
|
| 8 |
|
| 9 |
form = st.form("T5-form")
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
submit = form.form_submit_button("Submit")
|
| 12 |
|
| 13 |
if submit:
|
|
@@ -19,7 +32,7 @@ if submit:
|
|
| 19 |
do_sample=True,
|
| 20 |
max_length=50,
|
| 21 |
top_p=0.98,
|
| 22 |
-
num_return_sequences=
|
| 23 |
)
|
| 24 |
|
| 25 |
st.subheader("Suggested sentences: ")
|
|
|
|
| 7 |
tmodel = T5ForConditionalGeneration.from_pretrained('./')
|
| 8 |
|
| 9 |
form = st.form("T5-form")
|
| 10 |
+
|
| 11 |
+
examples =["They're house is on fire",
|
| 12 |
+
"Look if their is fire on the top",
|
| 13 |
+
"Where os you're car?",
|
| 14 |
+
"Iu is going to rain",
|
| 15 |
+
"Feel free to raach out to me",
|
| 16 |
+
"Life is shoetest so live freely",
|
| 17 |
+
"We do the boy actually stole the books",
|
| 18 |
+
"I am doing fine. How is you?"]
|
| 19 |
+
|
| 20 |
+
select_box = form.select_box(label="Choose an example",
|
| 21 |
+
options=examples)
|
| 22 |
+
st.write("(or)")
|
| 23 |
+
input_text = form.text_input(label='Enter your own sentence')
|
| 24 |
submit = form.form_submit_button("Submit")
|
| 25 |
|
| 26 |
if submit:
|
|
|
|
| 32 |
do_sample=True,
|
| 33 |
max_length=50,
|
| 34 |
top_p=0.98,
|
| 35 |
+
num_return_sequences=1
|
| 36 |
)
|
| 37 |
|
| 38 |
st.subheader("Suggested sentences: ")
|