thomas commited on
Commit ·
81ed61c
1
Parent(s): b7adcb8
feature(#86): fixed objects from component in gradio
Browse files- Brain/src/gradio_debug.py +10 -4
Brain/src/gradio_debug.py
CHANGED
|
@@ -2,6 +2,7 @@
|
|
| 2 |
import gradio as gr
|
| 3 |
import requests
|
| 4 |
import json
|
|
|
|
| 5 |
|
| 6 |
DEFAULT_UUID = "c40a09075d11940f"
|
| 7 |
|
|
@@ -31,11 +32,16 @@ def gradio_send_notification(uuid: str, query: str):
|
|
| 31 |
debug_send_notification = gr.Interface(
|
| 32 |
fn=gradio_send_notification,
|
| 33 |
inputs=[
|
| 34 |
-
|
| 35 |
-
label="UUID",
|
|
|
|
|
|
|
| 36 |
),
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
],
|
| 39 |
-
outputs=[gr.Textbox(label="Result"), gr.Number(label="Status Code")],
|
| 40 |
allow_flagging="never",
|
| 41 |
)
|
|
|
|
| 2 |
import gradio as gr
|
| 3 |
import requests
|
| 4 |
import json
|
| 5 |
+
from gradio.components import Textbox, Number
|
| 6 |
|
| 7 |
DEFAULT_UUID = "c40a09075d11940f"
|
| 8 |
|
|
|
|
| 32 |
debug_send_notification = gr.Interface(
|
| 33 |
fn=gradio_send_notification,
|
| 34 |
inputs=[
|
| 35 |
+
Textbox(
|
| 36 |
+
label="UUID",
|
| 37 |
+
placeholder="Please input your UUID.",
|
| 38 |
+
value="c40a09075d11940f",
|
| 39 |
),
|
| 40 |
+
Textbox(label="query", placeholder="Please input your prompt."),
|
| 41 |
+
],
|
| 42 |
+
outputs=[
|
| 43 |
+
Textbox(label="Result"),
|
| 44 |
+
Number(label="Status Code"),
|
| 45 |
],
|
|
|
|
| 46 |
allow_flagging="never",
|
| 47 |
)
|