linm1 commited on
Commit
3fe04de
·
verified ·
1 Parent(s): 302615c

Update app.py

Browse files

debug for user info

Files changed (1) hide show
  1. app.py +2 -15
app.py CHANGED
@@ -124,20 +124,7 @@ def thumbs_up(image, caption):
124
  conn.commit()
125
  conn.close()
126
  print(f"Thumbs up data saved to database.")
127
- return gr.Notification("Thank you for your feedback!", type="success")
128
-
129
- # Create Gradio interface
130
- custom_css = """
131
- .highlight-btn {
132
- background-color: #3498db !important;
133
- border-color: #3498db !important;
134
- color: white !important;
135
- }
136
- .highlight-btn:hover {
137
- background-color: #2980b9 !important;
138
- border-color: #2980b9 !important;
139
- }
140
- """
141
 
142
  with gr.Blocks() as iface:
143
  gr.Markdown("# Image Captioner")
@@ -148,7 +135,7 @@ with gr.Blocks() as iface:
148
  input_image = gr.Image(type="pil")
149
  with gr.Row():
150
  clear_btn = gr.Button("Clear")
151
- submit_btn = gr.Button("Submit", elem_classes=["highlight-btn"])
152
 
153
  with gr.Column(scale=1):
154
  output_text = gr.Textbox()
 
124
  conn.commit()
125
  conn.close()
126
  print(f"Thumbs up data saved to database.")
127
+ return gr.info("Thank you for your feedback!")
 
 
 
 
 
 
 
 
 
 
 
 
 
128
 
129
  with gr.Blocks() as iface:
130
  gr.Markdown("# Image Captioner")
 
135
  input_image = gr.Image(type="pil")
136
  with gr.Row():
137
  clear_btn = gr.Button("Clear")
138
+ submit_btn = gr.Button("Submit")
139
 
140
  with gr.Column(scale=1):
141
  output_text = gr.Textbox()