Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -68,12 +68,6 @@ def generate_images(prompts):
|
|
| 68 |
|
| 69 |
# UI creation
|
| 70 |
with gr.Blocks() as app:
|
| 71 |
-
feedback_input = gr.Textbox(label="Enter your feedback", placeholder="Write your feedback here...")
|
| 72 |
-
like_button = gr.Button(value="๐ Like")
|
| 73 |
-
dislike_button = gr.Button(value="๐ Dislike")
|
| 74 |
-
feedback_result = gr.Textbox(label="System Response", interactive=False)
|
| 75 |
-
refresh_button = gr.Button("Refresh Page")
|
| 76 |
-
|
| 77 |
with gr.Tabs("Prompt Input"):
|
| 78 |
with gr.Tab("Generate Images"):
|
| 79 |
prompt_input = gr.Dropdown(choices=predefined_prompts, label="Select a defect prompt")
|
|
@@ -98,6 +92,13 @@ with gr.Blocks() as app:
|
|
| 98 |
inputs=[custom_prompt_input, number_input_custom],
|
| 99 |
outputs=image_outputs_custom
|
| 100 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
|
| 102 |
like_button.click(lambda x: handle_feedback(x, "like"), inputs=feedback_input, outputs=feedback_result)
|
| 103 |
dislike_button.click(lambda x: handle_feedback(x, "dislike"), inputs=feedback_input, outputs=feedback_result)
|
|
|
|
| 68 |
|
| 69 |
# UI creation
|
| 70 |
with gr.Blocks() as app:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
with gr.Tabs("Prompt Input"):
|
| 72 |
with gr.Tab("Generate Images"):
|
| 73 |
prompt_input = gr.Dropdown(choices=predefined_prompts, label="Select a defect prompt")
|
|
|
|
| 92 |
inputs=[custom_prompt_input, number_input_custom],
|
| 93 |
outputs=image_outputs_custom
|
| 94 |
)
|
| 95 |
+
|
| 96 |
+
feedback_input = gr.Textbox(label="Enter your feedback", placeholder="Write your feedback here...")
|
| 97 |
+
like_button = gr.Button(value="๐ Like")
|
| 98 |
+
dislike_button = gr.Button(value="๐ Dislike")
|
| 99 |
+
feedback_result = gr.Textbox(label="System Response", interactive=False)
|
| 100 |
+
refresh_button = gr.Button("Refresh Page")
|
| 101 |
+
|
| 102 |
|
| 103 |
like_button.click(lambda x: handle_feedback(x, "like"), inputs=feedback_input, outputs=feedback_result)
|
| 104 |
dislike_button.click(lambda x: handle_feedback(x, "dislike"), inputs=feedback_input, outputs=feedback_result)
|