Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -103,26 +103,22 @@ runtext =st.text_area(inputNote, str(original_text2), height=300)
|
|
103 |
|
104 |
def visualize (run_text,output):
|
105 |
text =''
|
106 |
-
|
107 |
-
for
|
108 |
-
|
109 |
-
|
110 |
-
#
|
111 |
-
|
112 |
-
#
|
113 |
-
|
114 |
-
#
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
if sentence in best_sentences:
|
121 |
-
text += ' ' + str(sentence).replace(sentence, f"<mark>{sentence}</mark>")
|
122 |
-
else:
|
123 |
-
text += ' ' + sentence
|
124 |
# display(HTML(f""" {text} """))
|
125 |
-
|
126 |
|
127 |
|
128 |
def run_model(input_text):
|
@@ -174,9 +170,9 @@ with col2:
|
|
174 |
|
175 |
col3, col4 = st.columns(2)
|
176 |
with col3:
|
177 |
-
|
178 |
-
|
179 |
-
st.write(splittext)
|
180 |
with col4:
|
181 |
st.text_area('testing', str(reference_text))#,label_visibility="hidden")
|
182 |
|
|
|
103 |
|
104 |
def visualize (run_text,output):
|
105 |
text =''
|
106 |
+
splitruntext = [x for x in runtext.split('.')]
|
107 |
+
splitoutput = [x for x in output.split('.')]
|
108 |
+
# best_sentences = []
|
109 |
+
# for sentence in output:
|
110 |
+
# best_sentences.append(str(sentence))
|
111 |
+
|
112 |
+
# text = ''
|
113 |
+
|
114 |
+
# #display(HTML(f'<h1>Summary - {title}</h1>'))
|
115 |
+
# for sentence in run_text:
|
116 |
+
# if sentence in best_sentences:
|
117 |
+
# text += ' ' + str(sentence).replace(sentence, f"<mark>{sentence}</mark>")
|
118 |
+
# else:
|
119 |
+
# text += ' ' + sentence
|
|
|
|
|
|
|
|
|
120 |
# display(HTML(f""" {text} """))
|
121 |
+
return splitoutput,splitruntext
|
122 |
|
123 |
|
124 |
def run_model(input_text):
|
|
|
170 |
|
171 |
col3, col4 = st.columns(2)
|
172 |
with col3:
|
173 |
+
st.text_area(visualize (runtext,output))
|
174 |
+
|
175 |
+
#st.write(splittext)
|
176 |
with col4:
|
177 |
st.text_area('testing', str(reference_text))#,label_visibility="hidden")
|
178 |
|