Spaces:
Runtime error
Runtime error
Commit
·
f361e85
1
Parent(s):
3cebda9
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ def chat_accordion():
|
|
22 |
temperature = gr.Slider(
|
23 |
minimum=0.1,
|
24 |
maximum=2.0,
|
25 |
-
value=
|
26 |
step=0.1,
|
27 |
interactive=True,
|
28 |
label="Temperature",
|
@@ -30,7 +30,7 @@ def chat_accordion():
|
|
30 |
top_p = gr.Slider(
|
31 |
minimum=0.1,
|
32 |
maximum=0.99,
|
33 |
-
value=0.
|
34 |
step=0.01,
|
35 |
interactive=True,
|
36 |
label="p (nucleus sampling)",
|
@@ -49,18 +49,16 @@ def format_chat_prompt(message: str, chat_history, instructions: str) -> str:
|
|
49 |
|
50 |
|
51 |
def chat(client: Client):
|
52 |
-
|
53 |
with gr.Column(elem_id="chat_container"):
|
54 |
with gr.Row():
|
55 |
chatbot = gr.Chatbot(elem_id="chatbot")
|
56 |
with gr.Row():
|
57 |
-
|
58 |
placeholder=f"Hello {BOT_NAME} !!",
|
59 |
-
label="Type
|
60 |
max_lines=3,
|
61 |
)
|
62 |
-
|
63 |
-
|
64 |
with gr.Row(elem_id="button_container"):
|
65 |
with gr.Column():
|
66 |
retry_button = gr.Button("♻️ Retry last turn")
|
@@ -77,7 +75,6 @@ def chat(client: Client):
|
|
77 |
["Can you tell me more about deep-water soloing?"],
|
78 |
["Can you write a short tweet about the Apache 2.0 release of our latest AI model, Falcon LLM?"],
|
79 |
],
|
80 |
-
|
81 |
inputs=inputs,
|
82 |
label="Click on any example and press Enter in the input textbox!",
|
83 |
)
|
@@ -215,4 +212,4 @@ if __name__ == "__main__":
|
|
215 |
client = Client(args.addr, headers={"Authorization": f"Basic {INFERENCE_AUTH}"})
|
216 |
demo = get_demo(client)
|
217 |
demo.queue(max_size=128, concurrency_count=16)
|
218 |
-
demo.launch()
|
|
|
22 |
temperature = gr.Slider(
|
23 |
minimum=0.1,
|
24 |
maximum=2.0,
|
25 |
+
value=0.8,
|
26 |
step=0.1,
|
27 |
interactive=True,
|
28 |
label="Temperature",
|
|
|
30 |
top_p = gr.Slider(
|
31 |
minimum=0.1,
|
32 |
maximum=0.99,
|
33 |
+
value=0.9,
|
34 |
step=0.01,
|
35 |
interactive=True,
|
36 |
label="p (nucleus sampling)",
|
|
|
49 |
|
50 |
|
51 |
def chat(client: Client):
|
|
|
52 |
with gr.Column(elem_id="chat_container"):
|
53 |
with gr.Row():
|
54 |
chatbot = gr.Chatbot(elem_id="chatbot")
|
55 |
with gr.Row():
|
56 |
+
inputs = gr.Textbox(
|
57 |
placeholder=f"Hello {BOT_NAME} !!",
|
58 |
+
label="Type an input and press Enter",
|
59 |
max_lines=3,
|
60 |
)
|
61 |
+
|
|
|
62 |
with gr.Row(elem_id="button_container"):
|
63 |
with gr.Column():
|
64 |
retry_button = gr.Button("♻️ Retry last turn")
|
|
|
75 |
["Can you tell me more about deep-water soloing?"],
|
76 |
["Can you write a short tweet about the Apache 2.0 release of our latest AI model, Falcon LLM?"],
|
77 |
],
|
|
|
78 |
inputs=inputs,
|
79 |
label="Click on any example and press Enter in the input textbox!",
|
80 |
)
|
|
|
212 |
client = Client(args.addr, headers={"Authorization": f"Basic {INFERENCE_AUTH}"})
|
213 |
demo = get_demo(client)
|
214 |
demo.queue(max_size=128, concurrency_count=16)
|
215 |
+
demo.launch()
|