update on app.py
Browse files
app.py
CHANGED
@@ -28,10 +28,9 @@ import gc
|
|
28 |
|
29 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
30 |
|
31 |
-
desc = '''
|
32 |
-
According to the author: "It combines the best of RNN and transformers - great performance, fast inference, saves VRAM, fast training, "infinite" ctx_len, and free sentence embedding."'''
|
33 |
|
34 |
-
thanks = '''
|
35 |
|
36 |
|
37 |
def to_md(text):
|
@@ -261,17 +260,17 @@ iface = gr.Interface(
|
|
261 |
|
262 |
chatiface = gr.Interface(
|
263 |
fn=chat,
|
264 |
-
description=f'''<h3>
|
265 |
allow_flagging="never",
|
266 |
inputs=[
|
267 |
gr.Textbox(lines=5, label="Message"), # prompt
|
268 |
"state",
|
269 |
gr.Text(lines=1, value="USER", label="Your Name",
|
270 |
placeholder="Enter your Name"),
|
271 |
-
gr.Slider(1, 256, value=60), # max_tokens
|
272 |
-
gr.Slider(0.0, 1.0, value=0.8), # temperature
|
273 |
-
gr.Slider(0.0, 1.0, value=0.85), # top_p
|
274 |
-
gr.Slider(-99, 0.0, value=-2, step=0.5, label="Reduce End of Text Probability"), # end_adj
|
275 |
],
|
276 |
outputs=[gr.Chatbot(label="Chat Log", color_map=(
|
277 |
"green", "pink")), "state"],
|
@@ -279,7 +278,7 @@ chatiface = gr.Interface(
|
|
279 |
|
280 |
demo = gr.TabbedInterface(
|
281 |
|
282 |
-
[
|
283 |
title=title,
|
284 |
|
285 |
)
|
|
|
28 |
|
29 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
30 |
|
31 |
+
desc = ''''''
|
|
|
32 |
|
33 |
+
thanks = ''''''
|
34 |
|
35 |
|
36 |
def to_md(text):
|
|
|
260 |
|
261 |
chatiface = gr.Interface(
|
262 |
fn=chat,
|
263 |
+
description=f'''<h3>Intelligent CahtBot By - Maxisz </h3><h4>Refresh page or change name to reset memory context</h4>{desc}{thanks}''',
|
264 |
allow_flagging="never",
|
265 |
inputs=[
|
266 |
gr.Textbox(lines=5, label="Message"), # prompt
|
267 |
"state",
|
268 |
gr.Text(lines=1, value="USER", label="Your Name",
|
269 |
placeholder="Enter your Name"),
|
270 |
+
# gr.Slider(1, 256, value=60), # max_tokens
|
271 |
+
# gr.Slider(0.0, 1.0, value=0.8), # temperature
|
272 |
+
# gr.Slider(0.0, 1.0, value=0.85), # top_p
|
273 |
+
# gr.Slider(-99, 0.0, value=-2, step=0.5, label="Reduce End of Text Probability"), # end_adj
|
274 |
],
|
275 |
outputs=[gr.Chatbot(label="Chat Log", color_map=(
|
276 |
"green", "pink")), "state"],
|
|
|
278 |
|
279 |
demo = gr.TabbedInterface(
|
280 |
|
281 |
+
[chatiface], ["Chatbot"],
|
282 |
title=title,
|
283 |
|
284 |
)
|