Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -384,8 +384,8 @@ with gr.Blocks() as iface:
|
|
384 |
# Other output components...
|
385 |
|
386 |
# Specify inputs and events
|
387 |
-
inputs = [input_text,
|
388 |
-
events = [output_text,
|
389 |
|
390 |
iface.load(inputs, events)
|
391 |
def log_messages(inputs, outputs):
|
@@ -514,28 +514,9 @@ with iface:
|
|
514 |
[msg, chatbot, agent_dropdown, sys_prompt, temperature, max_new_tokens, top_p, repetition_penalty],
|
515 |
[chatbot, msg])
|
516 |
clear.click(lambda: None, None, chatbot, queue=False)
|
|
|
517 |
|
518 |
-
|
519 |
-
|
520 |
-
iface.load(fn=
|
521 |
-
iface.load(fn=update_sys_prompt, inputs=agent_dropdown, outputs=sys_prompt)
|
522 |
-
iface.load(fn=log_messages, input_type='state', event_type='save_model')
|
523 |
-
|
524 |
-
with gr.Blocks() as iface:
|
525 |
-
# Input components
|
526 |
-
input_text = gr.Textbox(label="Input Text")
|
527 |
-
# Other input components...
|
528 |
-
|
529 |
-
# Output components
|
530 |
-
output_text = gr.Textbox(label="Output Text")
|
531 |
-
# Other output components...
|
532 |
-
|
533 |
-
# Specify inputs and events
|
534 |
-
inputs = [input_text, ...] # List of input components
|
535 |
-
events = [output_text, ...] # List of output components
|
536 |
-
|
537 |
-
@gr.Interface.load(inputs, events)
|
538 |
-
def log_messages(inputs, outputs):
|
539 |
-
logger(f'Input: {inputs}, Output: {outputs}')
|
540 |
-
|
541 |
iface.launch()
|
|
|
384 |
# Other output components...
|
385 |
|
386 |
# Specify inputs and events
|
387 |
+
inputs = [input_text, events] # List of input components
|
388 |
+
events = [output_text, events ] # List of output components
|
389 |
|
390 |
iface.load(inputs, events)
|
391 |
def log_messages(inputs, outputs):
|
|
|
514 |
[msg, chatbot, agent_dropdown, sys_prompt, temperature, max_new_tokens, top_p, repetition_penalty],
|
515 |
[chatbot, msg])
|
516 |
clear.click(lambda: None, None, chatbot, queue=False)
|
517 |
+
gr.Examples(examples, [msg, agent_dropdown, sys_prompt, temperature, max_new_tokens, top_p, repetition_penalty]),
|
518 |
|
519 |
+
iface.load(fn=get_helpful_tip, inputs=agent_dropdown, outputs=ui.info),
|
520 |
+
iface.load(fn=update_sys_prompt, inputs=agent_dropdown, outputs=sys_prompt),
|
521 |
+
iface.load(fn=log_messages, input_type= state, event_type= save_model)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
522 |
iface.launch()
|