Method314 commited on
Commit
5e54d5f
·
verified ·
1 Parent(s): 456ac36

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -2
app.py CHANGED
@@ -181,7 +181,7 @@ def plot_candlestick_chart(data, ticker):
181
  # Get the current date
182
  current_date = datetime.now().strftime("%Y-%m-%d")
183
 
184
- # Custom CSS for button and input hover effects
185
  custom_css = """
186
  .center-text {
187
  text-align: center;
@@ -190,11 +190,20 @@ custom_css = """
190
  #generate-button:hover, #ticker-input input:hover, #start-date-input input:hover, #end-date-input input:hover {
191
  background-color: #FFB3BA !important; /* Pastel red */
192
  }
 
 
 
 
 
 
 
193
  """
194
 
195
  # Create Gradio interface with custom Seafoam theme
196
  with gr.Blocks(theme=seafoam, title="Log Stock Charts", css=custom_css) as iface:
197
- gr.Markdown("# Log Stock Charts", elem_classes=["center-text"])
 
 
198
  gr.Markdown("Enter a stock ticker and date range to generate a chart.", elem_classes=["center-text"])
199
 
200
  with gr.Row():
 
181
  # Get the current date
182
  current_date = datetime.now().strftime("%Y-%m-%d")
183
 
184
+ # Custom CSS for button and input hover effects, and to style the header image
185
  custom_css = """
186
  .center-text {
187
  text-align: center;
 
190
  #generate-button:hover, #ticker-input input:hover, #start-date-input input:hover, #end-date-input input:hover {
191
  background-color: #FFB3BA !important; /* Pastel red */
192
  }
193
+
194
+ #header-image {
195
+ display: block;
196
+ margin: 0 auto;
197
+ max-width: 100%;
198
+ height: auto;
199
+ }
200
  """
201
 
202
  # Create Gradio interface with custom Seafoam theme
203
  with gr.Blocks(theme=seafoam, title="Log Stock Charts", css=custom_css) as iface:
204
+ # Use the custom header image
205
+ gr.Image("header.png", elem_id="header-image", show_label=False)
206
+
207
  gr.Markdown("Enter a stock ticker and date range to generate a chart.", elem_classes=["center-text"])
208
 
209
  with gr.Row():