bluenevus commited on
Commit
63947e9
·
verified ·
1 Parent(s): f2267c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -16,9 +16,9 @@ def generate_release_notes(github_url, github_token, gemini_api_key, start_date,
16
  repo_name = github_url.split('/')[-1].replace('.git', '')
17
  repo = g.get_repo(f"MicroHealthLLC/{repo_name}")
18
 
19
- # Convert dates to datetime objects
20
- start_date = datetime.strptime(start_date, "%Y-%m-%d")
21
- end_date = datetime.strptime(end_date, "%Y-%m-%d")
22
 
23
  # Fetch commits
24
  commits = repo.get_commits(since=start_date, until=end_date)
@@ -40,8 +40,8 @@ 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.Textbox(label="Start Date (YYYY-MM-DD)"),
44
- gr.Textbox(label="End Date (YYYY-MM-DD)")
45
  ],
46
  outputs=gr.Textbox(label="Generated Release Notes"),
47
  title="Automated Release Notes Generator",
 
16
  repo_name = github_url.split('/')[-1].replace('.git', '')
17
  repo = g.get_repo(f"MicroHealthLLC/{repo_name}")
18
 
19
+ # Convert dates to datetime objects (they're already in datetime format now)
20
+ start_date = start_date.replace(tzinfo=None)
21
+ end_date = end_date.replace(tzinfo=None)
22
 
23
  # Fetch commits
24
  commits = repo.get_commits(since=start_date, until=end_date)
 
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.Date(label="Start Date"),
44
+ gr.Date(label="End Date")
45
  ],
46
  outputs=gr.Textbox(label="Generated Release Notes"),
47
  title="Automated Release Notes Generator",