Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -98,12 +98,13 @@ def clickbait_generator(article_content, condition_lambda=5.0):
|
|
98 |
|
99 |
return results[0].replace('</s>', '').replace('<pad>', '')
|
100 |
|
101 |
-
title = "Clickbait generator"
|
102 |
description = """
|
103 |
-
|
|
|
104 |
"""
|
105 |
|
106 |
-
article = "Check out [the codebase for our model](https://github.com/dsvilarkovic/naacl-2021-fudge-controlled-generation) that this demo is based
|
107 |
|
108 |
|
109 |
app = gr.Interface(
|
@@ -111,5 +112,8 @@ app = gr.Interface(
|
|
111 |
description = description,
|
112 |
label = 'Article content or paragraph',
|
113 |
fn = clickbait_generator,
|
114 |
-
inputs=["text", gr.Slider(0, 100, step=0.1, value=5.0)],
|
|
|
|
|
|
|
115 |
app.launch()
|
|
|
98 |
|
99 |
return results[0].replace('</s>', '').replace('<pad>', '')
|
100 |
|
101 |
+
title = "Clickbaitinator - Controllable Clickbait generator"
|
102 |
description = """
|
103 |
+
Use the [Fudge](https://github.com/yangkevin2/naacl-2021-fudge-controlled-generation) implementation fine-tuned for our purposes to try and create news headline you are looking for! Use condition_lambda to steer your clickbaitiness higher (by increasing the slider value) or lower (by decreasing the slider value). <br/>
|
104 |
+
Note that this is using two Transformers and is executed with CPU-only, so it will take a minute or two to finish generating a title.
|
105 |
"""
|
106 |
|
107 |
+
article = "Check out [the codebase for our model](https://github.com/dsvilarkovic/naacl-2021-fudge-controlled-generation) that this demo is based of. You need collaborator access, which you have been probably invited for."
|
108 |
|
109 |
|
110 |
app = gr.Interface(
|
|
|
112 |
description = description,
|
113 |
label = 'Article content or paragraph',
|
114 |
fn = clickbait_generator,
|
115 |
+
inputs=["text", gr.Slider(0, 100, step=0.1, value=5.0)],
|
116 |
+
outputs="text",
|
117 |
+
article=article,
|
118 |
+
)
|
119 |
app.launch()
|