yasserrmd commited on
Commit
489147e
1 Parent(s): cd40814

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -27,7 +27,6 @@ button:hover {background-color: #45a049;}
27
  h1 {color: #333; font-size: 36px; text-align: center; margin-bottom: 20px;}
28
  h2 {color: #555; font-size: 24px; margin-bottom: 10px;}
29
  footer {text-align: center; padding: 20px; font-size: 14px;}
30
- .grid {display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; justify-items: stretch;}
31
  """
32
 
33
  # Define example entries
@@ -54,15 +53,16 @@ with gr.Blocks(css=css) as journal_app:
54
  gr.Markdown("### **Select an example to start writing:**")
55
 
56
  # Align buttons in grid format for better layout
 
 
 
 
 
 
 
57
  with gr.Row():
58
  prompt_textbox = gr.Textbox(label="Write your thoughts here:", placeholder="Start writing or select an example...", elem_id="prompt_box", lines=5)
59
 
60
- with gr.Column():
61
- # Arrange example buttons in grid format
62
- with gr.Box(elem_classes="grid"):
63
- for i, entry in enumerate(example_entries):
64
- gr.Button(f"Example {i+1}").click(fn=lambda e=entry: fill_prompt(e), inputs=None, outputs=prompt_textbox)
65
-
66
  with gr.Row():
67
  # Output for generated text
68
  output = gr.Textbox(label="Your AI Journal Entry ✨", lines=6)
 
27
  h1 {color: #333; font-size: 36px; text-align: center; margin-bottom: 20px;}
28
  h2 {color: #555; font-size: 24px; margin-bottom: 10px;}
29
  footer {text-align: center; padding: 20px; font-size: 14px;}
 
30
  """
31
 
32
  # Define example entries
 
53
  gr.Markdown("### **Select an example to start writing:**")
54
 
55
  # Align buttons in grid format for better layout
56
+ with gr.Row():
57
+ with gr.Column():
58
+ # Aligning buttons using columns and rows
59
+ for i, entry in enumerate(example_entries):
60
+ gr.Button(f"Example {i+1}").click(fn=lambda e=entry: fill_prompt(e), inputs=None, outputs="prompt_textbox")
61
+
62
+ # Input text box for writing thoughts
63
  with gr.Row():
64
  prompt_textbox = gr.Textbox(label="Write your thoughts here:", placeholder="Start writing or select an example...", elem_id="prompt_box", lines=5)
65
 
 
 
 
 
 
 
66
  with gr.Row():
67
  # Output for generated text
68
  output = gr.Textbox(label="Your AI Journal Entry ✨", lines=6)