Update app.py
Browse files
app.py
CHANGED
@@ -33,6 +33,15 @@ footer {text-align: center; padding: 10px;}
|
|
33 |
#prompt_box {padding: 10px; background-color: #f9f9f9; border-radius: 10px;}
|
34 |
"""
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
# Create the Gradio interface
|
37 |
with gr.Blocks(css=css) as journal_app:
|
38 |
|
@@ -40,20 +49,12 @@ with gr.Blocks(css=css) as journal_app:
|
|
40 |
gr.Markdown("# 📝 Productivity Journal")
|
41 |
gr.Markdown("Welcome to your personalized productivity journal. Click an example below or write your thoughts!")
|
42 |
|
43 |
-
# Actual example journal entries
|
44 |
gr.Markdown("### **Click an example to start writing:**")
|
45 |
|
46 |
with gr.Row():
|
47 |
-
|
48 |
-
"
|
49 |
-
"🧠 I faced a tough challenge today when I had to give a presentation with very little preparation. Despite feeling nervous, I managed to pull through by staying calm and focused.",
|
50 |
-
"🎯 Tomorrow, my goal is to focus on improving my communication skills during team meetings. I want to make sure I’m clear and concise in expressing my ideas.",
|
51 |
-
"📝 I’m grateful for the support I received from my coworkers today. Their encouragement really helped me push through a stressful moment.",
|
52 |
-
"🚀 I learned a new approach to managing my time more effectively today. I’m going to apply this to my daily routine to see if it helps me stay more productive."
|
53 |
-
]
|
54 |
-
|
55 |
-
for entry in example_entries:
|
56 |
-
gr.Button(entry).click(fn=fill_prompt, inputs=[], outputs="prompt_textbox")
|
57 |
|
58 |
with gr.Row():
|
59 |
with gr.Column():
|
@@ -75,4 +76,4 @@ with gr.Blocks(css=css) as journal_app:
|
|
75 |
gr.Markdown("Made with ❤️ using Gradio and Llama-3.2")
|
76 |
|
77 |
# Launch the app
|
78 |
-
journal_app.launch()
|
|
|
33 |
#prompt_box {padding: 10px; background-color: #f9f9f9; border-radius: 10px;}
|
34 |
"""
|
35 |
|
36 |
+
# Define example entries
|
37 |
+
example_entries = [
|
38 |
+
"Today, I finished a major project that I’ve been working on for weeks. It felt great to finally get it done, and I’m proud of the effort I put in.",
|
39 |
+
"I faced a tough challenge today when I had to give a presentation with very little preparation. Despite feeling nervous, I managed to pull through by staying calm and focused.",
|
40 |
+
"Tomorrow, my goal is to focus on improving my communication skills during team meetings. I want to make sure I’m clear and concise in expressing my ideas.",
|
41 |
+
"I’m grateful for the support I received from my coworkers today. Their encouragement really helped me push through a stressful moment.",
|
42 |
+
"I learned a new approach to managing my time more effectively today. I’m going to apply this to my daily routine to see if it helps me stay more productive."
|
43 |
+
]
|
44 |
+
|
45 |
# Create the Gradio interface
|
46 |
with gr.Blocks(css=css) as journal_app:
|
47 |
|
|
|
49 |
gr.Markdown("# 📝 Productivity Journal")
|
50 |
gr.Markdown("Welcome to your personalized productivity journal. Click an example below or write your thoughts!")
|
51 |
|
52 |
+
# Actual example journal entries as clickable buttons
|
53 |
gr.Markdown("### **Click an example to start writing:**")
|
54 |
|
55 |
with gr.Row():
|
56 |
+
for i, entry in enumerate(example_entries):
|
57 |
+
gr.Button(f"Example {i+1}").click(fn=lambda e=entry: fill_prompt(e), inputs=[], outputs="prompt_textbox")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
with gr.Row():
|
60 |
with gr.Column():
|
|
|
76 |
gr.Markdown("Made with ❤️ using Gradio and Llama-3.2")
|
77 |
|
78 |
# Launch the app
|
79 |
+
journal_app.launch()
|