JohanBeytell commited on
Commit
e1b053a
·
verified ·
1 Parent(s): e726a2d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
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.Textbox(label="Generated Names"),
181
- gr.Button(value="Flag", elem_id="flag_button"),
182
  ],
183
  title='Dungen Dev - Name Generator',
184
- description='A prompt-based name generator for game developers. Dungen Dev is an experimental model, and may produce outputs that are inappropriate, biased, or potentially harmful and inaccurate. Caution is advised.',
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],