Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -15,17 +15,17 @@ def main():
|
|
15 |
)
|
16 |
painter.to('cuda')
|
17 |
|
18 |
-
st.title("
|
19 |
-
st.write("
|
20 |
user_input = st.text_input("")
|
21 |
|
22 |
if user_input:
|
23 |
result_1 = classifier(user_input)
|
24 |
label = result_1[0]['label']
|
25 |
-
st.write(f"Label of this text: {
|
26 |
|
27 |
result_2 = summarizer(user_input, max_length=100, min_length=30, do_sample=False)
|
28 |
-
summary = result_2['summary_text']
|
29 |
|
30 |
description = f"This is mainly about {label}: {summary}"
|
31 |
negative_prompt = "nsfw, lowres, (bad), text, error, fewer, extra, missing, worst quality, jpeg artifacts, low quality, watermark, unfinished, displeasing, oldest, early, chromatic aberration, signature, extra digits, artistic error, username, scan, [abstract]"
|
|
|
15 |
)
|
16 |
painter.to('cuda')
|
17 |
|
18 |
+
st.title("Brief Report Generator")
|
19 |
+
st.write("Copy the text here:")
|
20 |
user_input = st.text_input("")
|
21 |
|
22 |
if user_input:
|
23 |
result_1 = classifier(user_input)
|
24 |
label = result_1[0]['label']
|
25 |
+
st.write(f"Label of this text: {label}")
|
26 |
|
27 |
result_2 = summarizer(user_input, max_length=100, min_length=30, do_sample=False)
|
28 |
+
summary = result_2[0]['summary_text']
|
29 |
|
30 |
description = f"This is mainly about {label}: {summary}"
|
31 |
negative_prompt = "nsfw, lowres, (bad), text, error, fewer, extra, missing, worst quality, jpeg artifacts, low quality, watermark, unfinished, displeasing, oldest, early, chromatic aberration, signature, extra digits, artistic error, username, scan, [abstract]"
|