Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -32,13 +32,19 @@ if submit:
|
|
32 |
do_sample=True,
|
33 |
max_length=50,
|
34 |
top_p=0.99,
|
35 |
-
num_return_sequences=
|
36 |
)
|
37 |
|
38 |
st.subheader("Suggested sentences: ")
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
do_sample=True,
|
33 |
max_length=50,
|
34 |
top_p=0.99,
|
35 |
+
num_return_sequences=1
|
36 |
)
|
37 |
|
38 |
st.subheader("Suggested sentences: ")
|
39 |
|
40 |
+
out_text = ttokenizer.decode(outputs[0], skip_special_tokens=True)
|
41 |
+
st.success(str(i) + '. ' + out_text)
|
42 |
+
|
43 |
+
c_text = " "
|
44 |
+
for x in input_text.split(" "):
|
45 |
+
if x in out_text.split(" "):
|
46 |
+
c_text = c_text + x
|
47 |
+
else:
|
48 |
+
c_text = c_text + """<p style="color:rgb(0,255,0);">""" + x + """</p>"""
|
49 |
+
|
50 |
+
st.markdown(c_text)
|