Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -133,7 +133,9 @@ async def chat_stream(
|
|
133 |
}
|
134 |
):
|
135 |
ppm.append_pong(result)
|
136 |
-
yield "", prompt, ppm.build_uis(), str(res)
|
|
|
|
|
137 |
|
138 |
def channel_num(btn_title):
|
139 |
choice = 0
|
@@ -235,7 +237,7 @@ with gr.Blocks(css=MODEL_SELECTION_CSS, theme='gradio/soft') as demo:
|
|
235 |
|
236 |
with gr.Column(elem_id="aux-btns-popup", visible=True):
|
237 |
with gr.Row():
|
238 |
-
stop = gr.Button("Stop", elem_classes=["aux-btn"])
|
239 |
regenerate = gr.Button("Regen", interactive=False, elem_classes=["aux-btn"])
|
240 |
clean = gr.Button("Clean", elem_classes=["aux-btn"])
|
241 |
|
@@ -309,7 +311,7 @@ with gr.Blocks(css=MODEL_SELECTION_CSS, theme='gradio/soft') as demo:
|
|
309 |
chat_stream,
|
310 |
[idx, local_data, instruction_txtbox, chat_state,
|
311 |
global_context, res_temp, res_topk, res_rpen, res_mnts, res_sample, ctx_num_lconv],
|
312 |
-
[instruction_txtbox, context_inspector, chatbot, local_data]
|
313 |
).then(
|
314 |
None, local_data, None,
|
315 |
_js="(v)=>{ setStorage('local_data',v) }"
|
|
|
133 |
}
|
134 |
):
|
135 |
ppm.append_pong(result)
|
136 |
+
yield "", prompt, ppm.build_uis(), str(res), gr.update(interactive=False)
|
137 |
+
|
138 |
+
yield "", prompt, ppm.build_uis(), str(res), gr.update(interactive=True)
|
139 |
|
140 |
def channel_num(btn_title):
|
141 |
choice = 0
|
|
|
237 |
|
238 |
with gr.Column(elem_id="aux-btns-popup", visible=True):
|
239 |
with gr.Row():
|
240 |
+
# stop = gr.Button("Stop", elem_classes=["aux-btn"])
|
241 |
regenerate = gr.Button("Regen", interactive=False, elem_classes=["aux-btn"])
|
242 |
clean = gr.Button("Clean", elem_classes=["aux-btn"])
|
243 |
|
|
|
311 |
chat_stream,
|
312 |
[idx, local_data, instruction_txtbox, chat_state,
|
313 |
global_context, res_temp, res_topk, res_rpen, res_mnts, res_sample, ctx_num_lconv],
|
314 |
+
[instruction_txtbox, context_inspector, chatbot, local_data, regenerate]
|
315 |
).then(
|
316 |
None, local_data, None,
|
317 |
_js="(v)=>{ setStorage('local_data',v) }"
|