Commit
·
6e036ca
1
Parent(s):
b60bfb0
Update app.py
Browse files
app.py
CHANGED
@@ -44,7 +44,7 @@ class CustomInterface(gr.Interface):
|
|
44 |
# CustomInterface class definition
|
45 |
class CustomInterface(gr.Interface):
|
46 |
def render_input_column(self):
|
47 |
-
submit_btn, clear_btn, stop_btn, flag_btns = None, None, None, None
|
48 |
|
49 |
with Column(variant="panel"):
|
50 |
input_component_column = Column()
|
@@ -53,13 +53,13 @@ class CustomInterface(gr.Interface):
|
|
53 |
component.render()
|
54 |
with Row():
|
55 |
if self.interface_type in [InterfaceTypes.STANDARD, InterfaceTypes.INPUT_ONLY]:
|
56 |
-
clear_btn = ClearButton(value
|
57 |
if not self.live:
|
58 |
submit_btn = Button("Ciaoooooooo", variant="primary") # Custom label
|
59 |
if inspect.isgeneratorfunction(self.fn) or inspect.isasyncgenfunction(self.fn):
|
60 |
stop_btn = Button("Stop", variant="stop", visible=False)
|
61 |
elif self.interface_type == InterfaceTypes.UNIFIED:
|
62 |
-
clear_btn = ClearButton(value
|
63 |
submit_btn = Button("Ciaoooooooo", variant="primary") # Custom label
|
64 |
if (inspect.isgeneratorfunction(self.fn) or inspect.isasyncgenfunction(self.fn)) and not self.live:
|
65 |
stop_btn = Button("Stop", variant="stop")
|
@@ -67,7 +67,9 @@ class CustomInterface(gr.Interface):
|
|
67 |
flag_btns = self.render_flag_btns()
|
68 |
elif self.allow_flagging == "auto":
|
69 |
flag_btns = [submit_btn]
|
70 |
-
|
|
|
|
|
71 |
|
72 |
|
73 |
# Define the device
|
|
|
44 |
# CustomInterface class definition
|
45 |
class CustomInterface(gr.Interface):
|
46 |
def render_input_column(self):
|
47 |
+
submit_btn, clear_btn, stop_btn, flag_btns, duplicate_btn = None, None, None, None, None
|
48 |
|
49 |
with Column(variant="panel"):
|
50 |
input_component_column = Column()
|
|
|
53 |
component.render()
|
54 |
with Row():
|
55 |
if self.interface_type in [InterfaceTypes.STANDARD, InterfaceTypes.INPUT_ONLY]:
|
56 |
+
clear_btn = ClearButton(value="XXXXXX")
|
57 |
if not self.live:
|
58 |
submit_btn = Button("Ciaoooooooo", variant="primary") # Custom label
|
59 |
if inspect.isgeneratorfunction(self.fn) or inspect.isasyncgenfunction(self.fn):
|
60 |
stop_btn = Button("Stop", variant="stop", visible=False)
|
61 |
elif self.interface_type == InterfaceTypes.UNIFIED:
|
62 |
+
clear_btn = ClearButton(value="XXXXXX")
|
63 |
submit_btn = Button("Ciaoooooooo", variant="primary") # Custom label
|
64 |
if (inspect.isgeneratorfunction(self.fn) or inspect.isasyncgenfunction(self.fn)) and not self.live:
|
65 |
stop_btn = Button("Stop", variant="stop")
|
|
|
67 |
flag_btns = self.render_flag_btns()
|
68 |
elif self.allow_flagging == "auto":
|
69 |
flag_btns = [submit_btn]
|
70 |
+
|
71 |
+
# Return the appropriate tuple
|
72 |
+
return submit_btn, clear_btn, stop_btn, flag_btns, input_component_column, duplicate_btn, None
|
73 |
|
74 |
|
75 |
# Define the device
|