Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -138,7 +138,7 @@ def generate_text(seed_text, next_words=30, temperature=0.5):
|
|
138 |
gr.Warning("Flagged potentially harmful output.")
|
139 |
decoded = 'Flagged Output'
|
140 |
|
141 |
-
return decoded
|
142 |
|
143 |
flagged_outputs = []
|
144 |
|
@@ -177,11 +177,10 @@ demo = gr.Interface(
|
|
177 |
gr.Slider(0.1, 1, value=0.5, label='Temperature', info='Controls randomness of generation, higher values = more creative, lower values = more probabilistic')
|
178 |
],
|
179 |
outputs=[
|
180 |
-
gr.
|
181 |
-
gr.Button(value="Flag", elem_id="flag_button"),
|
182 |
],
|
183 |
title='Dungen Dev - Name Generator',
|
184 |
-
description=
|
185 |
examples=[
|
186 |
["a male character name", 30, 0.5],
|
187 |
["a futuristic city name", 30, 0.5],
|
|
|
138 |
gr.Warning("Flagged potentially harmful output.")
|
139 |
decoded = 'Flagged Output'
|
140 |
|
141 |
+
return {"text": decoded, "flag_button": True}
|
142 |
|
143 |
flagged_outputs = []
|
144 |
|
|
|
177 |
gr.Slider(0.1, 1, value=0.5, label='Temperature', info='Controls randomness of generation, higher values = more creative, lower values = more probabilistic')
|
178 |
],
|
179 |
outputs=[
|
180 |
+
gr.JSON(label="Generated Names with Flag Button")
|
|
|
181 |
],
|
182 |
title='Dungen Dev - Name Generator',
|
183 |
+
description=None,
|
184 |
examples=[
|
185 |
["a male character name", 30, 0.5],
|
186 |
["a futuristic city name", 30, 0.5],
|