Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -106,11 +106,6 @@ def image_to_data_url(image):
|
|
| 106 |
|
| 107 |
# UI creation
|
| 108 |
with gr.Blocks() as app:
|
| 109 |
-
feedback_input = gr.Textbox(label="Enter your feedback", placeholder="Write your feedback here...")
|
| 110 |
-
like_button = gr.Button(value="๐ Like")
|
| 111 |
-
dislike_button = gr.Button(value="๐ Dislike")
|
| 112 |
-
feedback_result = gr.Textbox(label="System Response", interactive=False)
|
| 113 |
-
refresh_button = gr.Button("Refresh Page")
|
| 114 |
|
| 115 |
with gr.Tabs("Prompt Input"):
|
| 116 |
with gr.Tab("Generate Images"):
|
|
@@ -138,6 +133,12 @@ with gr.Blocks() as app:
|
|
| 138 |
outputs=gallery_inpaint
|
| 139 |
)
|
| 140 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 141 |
like_button.click(lambda x: handle_feedback(x, "like"), inputs=feedback_input, outputs=feedback_result)
|
| 142 |
dislike_button.click(lambda x: handle_feedback(x, "dislike"), inputs=feedback_input, outputs=feedback_result)
|
| 143 |
refresh_button.click(lambda: gr.update(reload_browser=True))
|
|
|
|
| 106 |
|
| 107 |
# UI creation
|
| 108 |
with gr.Blocks() as app:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 109 |
|
| 110 |
with gr.Tabs("Prompt Input"):
|
| 111 |
with gr.Tab("Generate Images"):
|
|
|
|
| 133 |
outputs=gallery_inpaint
|
| 134 |
)
|
| 135 |
|
| 136 |
+
feedback_input = gr.Textbox(label="Enter your feedback", placeholder="Write your feedback here...")
|
| 137 |
+
like_button = gr.Button(value="๐ Like")
|
| 138 |
+
dislike_button = gr.Button(value="๐ Dislike")
|
| 139 |
+
feedback_result = gr.Textbox(label="System Response", interactive=False)
|
| 140 |
+
refresh_button = gr.Button("Refresh Page")
|
| 141 |
+
|
| 142 |
like_button.click(lambda x: handle_feedback(x, "like"), inputs=feedback_input, outputs=feedback_result)
|
| 143 |
dislike_button.click(lambda x: handle_feedback(x, "dislike"), inputs=feedback_input, outputs=feedback_result)
|
| 144 |
refresh_button.click(lambda: gr.update(reload_browser=True))
|