Spaces:
Build error
Build error
sdhanabal1
commited on
Commit
•
0b264ed
1
Parent(s):
ced7370
Fix the error
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ To use this:
|
|
18 |
def load_model():
|
19 |
with st.spinner('Please wait for the model to load...'):
|
20 |
terms_and_conditions_pipeline = pipeline(
|
21 |
-
'
|
22 |
model='ml6team/distilbart-tos-summarizer-tosdr',
|
23 |
tokenizer='ml6team/distilbart-tos-summarizer-tosdr'
|
24 |
)
|
@@ -43,7 +43,7 @@ right_area.header("Output")
|
|
43 |
|
44 |
if submit_button:
|
45 |
base_text = st.session_state.tc_text
|
46 |
-
output_text = " ".join([result['
|
47 |
right_area.markdown('#####')
|
48 |
right_area.text_area(value=output_text, label="Summary:")
|
49 |
|
|
|
18 |
def load_model():
|
19 |
with st.spinner('Please wait for the model to load...'):
|
20 |
terms_and_conditions_pipeline = pipeline(
|
21 |
+
'text2text-generation',
|
22 |
model='ml6team/distilbart-tos-summarizer-tosdr',
|
23 |
tokenizer='ml6team/distilbart-tos-summarizer-tosdr'
|
24 |
)
|
|
|
43 |
|
44 |
if submit_button:
|
45 |
base_text = st.session_state.tc_text
|
46 |
+
output_text = " ".join([result['generated_text'] for result in tc_pipeline(base_text)])
|
47 |
right_area.markdown('#####')
|
48 |
right_area.text_area(value=output_text, label="Summary:")
|
49 |
|