Spaces:
Runtime error
Runtime error
Peter
commited on
Commit
·
f12c306
1
Parent(s):
86d9965
:lipstick: add default prompt
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ import time
|
|
| 12 |
import argparse
|
| 13 |
import logging
|
| 14 |
import gradio as gr
|
| 15 |
-
from gradio.inputs import Slider
|
| 16 |
import os
|
| 17 |
import sys
|
| 18 |
from os.path import dirname
|
|
@@ -197,7 +197,9 @@ if __name__ == "__main__":
|
|
| 197 |
iface = gr.Interface(
|
| 198 |
chat,
|
| 199 |
inputs=[
|
| 200 |
-
"
|
|
|
|
|
|
|
| 201 |
Slider(
|
| 202 |
minimum=0.0, maximum=1.0, step=0.01, default=0.6, label="temperature"
|
| 203 |
),
|
|
@@ -207,8 +209,8 @@ if __name__ == "__main__":
|
|
| 207 |
outputs="html",
|
| 208 |
examples_per_page=8,
|
| 209 |
examples=[
|
| 210 |
-
["
|
| 211 |
-
["
|
| 212 |
["Hi, my name is Reginald", 0.6, 0.95, 100],
|
| 213 |
["Happy birthday!", 0.9, 0.95, 50],
|
| 214 |
["I have a question, can you help me?", 0.6, 0.95, 50],
|
|
@@ -216,7 +218,7 @@ if __name__ == "__main__":
|
|
| 216 |
["Will you marry me?", 0.9, 0.95, 138],
|
| 217 |
["Are you single?", 0.6, 0.95, 138],
|
| 218 |
["Do you like people?", 0.7, 0.95, 25],
|
| 219 |
-
["
|
| 220 |
|
| 221 |
],
|
| 222 |
title=f"GPT Chatbot Demo: {default_model} Model",
|
|
|
|
| 12 |
import argparse
|
| 13 |
import logging
|
| 14 |
import gradio as gr
|
| 15 |
+
from gradio.inputs import Slider, Textbox
|
| 16 |
import os
|
| 17 |
import sys
|
| 18 |
from os.path import dirname
|
|
|
|
| 197 |
iface = gr.Interface(
|
| 198 |
chat,
|
| 199 |
inputs=[
|
| 200 |
+
Textbox(default_text="Why is everyone here eating chocolate cake?", label="prompt_message", placeholder="Enter a question",
|
| 201 |
+
lines=2,
|
| 202 |
+
),
|
| 203 |
Slider(
|
| 204 |
minimum=0.0, maximum=1.0, step=0.01, default=0.6, label="temperature"
|
| 205 |
),
|
|
|
|
| 209 |
outputs="html",
|
| 210 |
examples_per_page=8,
|
| 211 |
examples=[
|
| 212 |
+
["Point Break or Bad Boys II?", 0.75, 0.95, 50],
|
| 213 |
+
["So... you're saying this wasn't an accident?", 0.6, 0.95, 50],
|
| 214 |
["Hi, my name is Reginald", 0.6, 0.95, 100],
|
| 215 |
["Happy birthday!", 0.9, 0.95, 50],
|
| 216 |
["I have a question, can you help me?", 0.6, 0.95, 50],
|
|
|
|
| 218 |
["Will you marry me?", 0.9, 0.95, 138],
|
| 219 |
["Are you single?", 0.6, 0.95, 138],
|
| 220 |
["Do you like people?", 0.7, 0.95, 25],
|
| 221 |
+
["You never took a short cut before?", 0.7, 0.95, 125],
|
| 222 |
|
| 223 |
],
|
| 224 |
title=f"GPT Chatbot Demo: {default_model} Model",
|