Spaces:
Runtime error
Runtime error
add element
Browse files
app.py
CHANGED
|
@@ -128,13 +128,13 @@ def main():
|
|
| 128 |
friend_duration = gr.Slider(minimum=30, maximum=180, step=30, label="Friend Duration", info="Choose friend duration")
|
| 129 |
|
| 130 |
# Message Conditional Inputs
|
| 131 |
-
image_address = gr.Textbox(label="Your Image address", visible=False)
|
| 132 |
-
image_alt = gr.Textbox(label="Your Image ALT", visible=False)
|
| 133 |
-
image_width= gr.Textbox(label="Your Image Width", visible=False)
|
| 134 |
-
image_height= gr.Textbox(label="Your Image Height", visible=False)
|
| 135 |
-
text_message = gr.Textbox(label="Your Text message", visible=False)
|
| 136 |
-
endpoint_url = gr.Textbox(label="Your Endpint URL", visible=False)
|
| 137 |
-
dynamic_parameter = gr.Textbox(label="Your dynamic LINE UID parameter name", visible=False)
|
| 138 |
|
| 139 |
def toggle_inputs_file(option):
|
| 140 |
if option == "Text":
|
|
@@ -172,9 +172,9 @@ def main():
|
|
| 172 |
# option.change(fn=toggle_inputs, inputs=option, outputs=[image_address, image_alt, image_width, image_height, text_message, endpoint_url, dynamic_parameter])
|
| 173 |
|
| 174 |
# # Submit button and output
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
|
| 179 |
# submit_btn.click(fn=push_manneger,
|
| 180 |
# inputs=[line_access_token, file_option, list_uid, line_uid_file, option, image_address, image_alt, image_width, image_height, text_message, endpoint_url, dynamic_parameter],
|
|
@@ -185,7 +185,7 @@ def main():
|
|
| 185 |
# inputs=[],
|
| 186 |
# outputs=[line_access_token, file_option, list_uid,line_uid_file, option, image_address, image_alt, image_width, image_height, text_message, endpoint_url, dynamic_parameter, output])
|
| 187 |
|
| 188 |
-
ui.launch(
|
| 189 |
|
| 190 |
if __name__ == "__main__":
|
| 191 |
main()
|
|
|
|
| 128 |
friend_duration = gr.Slider(minimum=30, maximum=180, step=30, label="Friend Duration", info="Choose friend duration")
|
| 129 |
|
| 130 |
# Message Conditional Inputs
|
| 131 |
+
# image_address = gr.Textbox(label="Your Image address", visible=False)
|
| 132 |
+
# image_alt = gr.Textbox(label="Your Image ALT", visible=False)
|
| 133 |
+
# image_width= gr.Textbox(label="Your Image Width", visible=False)
|
| 134 |
+
# image_height= gr.Textbox(label="Your Image Height", visible=False)
|
| 135 |
+
# text_message = gr.Textbox(label="Your Text message", visible=False)
|
| 136 |
+
# endpoint_url = gr.Textbox(label="Your Endpint URL", visible=False)
|
| 137 |
+
# dynamic_parameter = gr.Textbox(label="Your dynamic LINE UID parameter name", visible=False)
|
| 138 |
|
| 139 |
def toggle_inputs_file(option):
|
| 140 |
if option == "Text":
|
|
|
|
| 172 |
# option.change(fn=toggle_inputs, inputs=option, outputs=[image_address, image_alt, image_width, image_height, text_message, endpoint_url, dynamic_parameter])
|
| 173 |
|
| 174 |
# # Submit button and output
|
| 175 |
+
submit_btn = gr.Button("Submit")
|
| 176 |
+
reset_btn = gr.Button("Reset")
|
| 177 |
+
output = gr.Textbox(label="Result", interactive=False)
|
| 178 |
|
| 179 |
# submit_btn.click(fn=push_manneger,
|
| 180 |
# inputs=[line_access_token, file_option, list_uid, line_uid_file, option, image_address, image_alt, image_width, image_height, text_message, endpoint_url, dynamic_parameter],
|
|
|
|
| 185 |
# inputs=[],
|
| 186 |
# outputs=[line_access_token, file_option, list_uid,line_uid_file, option, image_address, image_alt, image_width, image_height, text_message, endpoint_url, dynamic_parameter, output])
|
| 187 |
|
| 188 |
+
ui.launch()
|
| 189 |
|
| 190 |
if __name__ == "__main__":
|
| 191 |
main()
|