Update app.py
Browse files
app.py
CHANGED
|
@@ -31,7 +31,7 @@ def generate_release_notes(github_url, github_token, gemini_api_key, start_date,
|
|
| 31 |
|
| 32 |
# Set default dates
|
| 33 |
default_end_date = datetime.now()
|
| 34 |
-
default_start_date = default_end_date - timedelta(days=
|
| 35 |
|
| 36 |
# Create Gradio interface
|
| 37 |
iface = gr.Interface(
|
|
@@ -40,8 +40,18 @@ iface = gr.Interface(
|
|
| 40 |
gr.Textbox(label="GitHub Repository URL (e.g., https://github.com/MicroHealthLLC/maiko-assistant.git)"),
|
| 41 |
gr.Textbox(label="GitHub Personal Access Token", type="password"),
|
| 42 |
gr.Textbox(label="Gemini API Key", type="password"),
|
| 43 |
-
gr.DateTime(
|
| 44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
],
|
| 46 |
outputs=gr.Textbox(label="Generated Release Notes"),
|
| 47 |
title="Automated Release Notes Generator",
|
|
|
|
| 31 |
|
| 32 |
# Set default dates
|
| 33 |
default_end_date = datetime.now()
|
| 34 |
+
default_start_date = default_end_date - timedelta(days=7) # One week ago
|
| 35 |
|
| 36 |
# Create Gradio interface
|
| 37 |
iface = gr.Interface(
|
|
|
|
| 40 |
gr.Textbox(label="GitHub Repository URL (e.g., https://github.com/MicroHealthLLC/maiko-assistant.git)"),
|
| 41 |
gr.Textbox(label="GitHub Personal Access Token", type="password"),
|
| 42 |
gr.Textbox(label="Gemini API Key", type="password"),
|
| 43 |
+
gr.DateTime(
|
| 44 |
+
label="Start Date",
|
| 45 |
+
value=default_start_date,
|
| 46 |
+
type="datetime",
|
| 47 |
+
include_time=True
|
| 48 |
+
),
|
| 49 |
+
gr.DateTime(
|
| 50 |
+
label="End Date",
|
| 51 |
+
value=default_end_date,
|
| 52 |
+
type="datetime",
|
| 53 |
+
include_time=True
|
| 54 |
+
)
|
| 55 |
],
|
| 56 |
outputs=gr.Textbox(label="Generated Release Notes"),
|
| 57 |
title="Automated Release Notes Generator",
|