Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -78,6 +78,7 @@
|
|
| 78 |
# )
|
| 79 |
|
| 80 |
# demo.launch()
|
|
|
|
| 81 |
import sentencepiece as spm
|
| 82 |
import numpy as np
|
| 83 |
import tensorflow as tf
|
|
@@ -138,7 +139,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
|
| 142 |
|
| 143 |
flagged_outputs = []
|
| 144 |
|
|
@@ -177,10 +178,11 @@ 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 |
],
|
| 182 |
title='Dungen Dev - Name Generator',
|
| 183 |
-
description=
|
| 184 |
examples=[
|
| 185 |
["a male character name", 30, 0.5],
|
| 186 |
["a futuristic city name", 30, 0.5],
|
|
|
|
| 78 |
# )
|
| 79 |
|
| 80 |
# demo.launch()
|
| 81 |
+
|
| 82 |
import sentencepiece as spm
|
| 83 |
import numpy as np
|
| 84 |
import tensorflow as tf
|
|
|
|
| 139 |
gr.Warning("Flagged potentially harmful output.")
|
| 140 |
decoded = 'Flagged Output'
|
| 141 |
|
| 142 |
+
return decoded
|
| 143 |
|
| 144 |
flagged_outputs = []
|
| 145 |
|
|
|
|
| 178 |
gr.Slider(0.1, 1, value=0.5, label='Temperature', info='Controls randomness of generation, higher values = more creative, lower values = more probabilistic')
|
| 179 |
],
|
| 180 |
outputs=[
|
| 181 |
+
gr.Textbox(label="Generated Name"),
|
| 182 |
+
gr.Button("Flag Output")
|
| 183 |
],
|
| 184 |
title='Dungen Dev - Name Generator',
|
| 185 |
+
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.',
|
| 186 |
examples=[
|
| 187 |
["a male character name", 30, 0.5],
|
| 188 |
["a futuristic city name", 30, 0.5],
|