bluenevus commited on
Commit
80927e0
·
verified ·
1 Parent(s): 181bbda

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -2,9 +2,13 @@ import gradio as gr
2
  from datetime import datetime, timedelta
3
 
4
  def generate_release_notes(github_url, github_token, gemini_api_key, start_date, end_date):
 
 
 
 
5
  # Your existing function implementation here
6
  # ...
7
- return "Generated release notes would appear here."
8
 
9
  # Set default dates
10
  default_end_date = datetime.now()
@@ -19,17 +23,17 @@ iface = gr.Interface(
19
  gr.Textbox(label="Gemini API Key", type="password"),
20
  gr.DateTime(
21
  label="Start Date",
22
- value=default_start_date.isoformat(),
23
  type="datetime",
24
- include_time=True,
25
  interactive=True,
26
  visible=True
27
  ),
28
  gr.DateTime(
29
  label="End Date",
30
- value=default_end_date.isoformat(),
31
  type="datetime",
32
- include_time=True,
33
  interactive=True,
34
  visible=True
35
  )
@@ -39,11 +43,7 @@ iface = gr.Interface(
39
  description="Generate release notes based on GitHub commits using Gemini AI. Select start and end dates to define the time range for commits.",
40
  allow_flagging="never",
41
  theme="default",
42
- analytics_enabled=False,
43
- show_progress="full",
44
- batch=False,
45
- max_batch_size=4,
46
- api_name=None,
47
  )
48
 
49
  # Launch the app
 
2
  from datetime import datetime, timedelta
3
 
4
  def generate_release_notes(github_url, github_token, gemini_api_key, start_date, end_date):
5
+ # Parse the datetime strings
6
+ start_date = datetime.fromisoformat(start_date).date()
7
+ end_date = datetime.fromisoformat(end_date).date()
8
+
9
  # Your existing function implementation here
10
  # ...
11
+ return f"Generated release notes for {github_url} from {start_date} to {end_date}"
12
 
13
  # Set default dates
14
  default_end_date = datetime.now()
 
23
  gr.Textbox(label="Gemini API Key", type="password"),
24
  gr.DateTime(
25
  label="Start Date",
26
+ value=default_start_date.date().isoformat(),
27
  type="datetime",
28
+ include_time=False,
29
  interactive=True,
30
  visible=True
31
  ),
32
  gr.DateTime(
33
  label="End Date",
34
+ value=default_end_date.date().isoformat(),
35
  type="datetime",
36
+ include_time=False,
37
  interactive=True,
38
  visible=True
39
  )
 
43
  description="Generate release notes based on GitHub commits using Gemini AI. Select start and end dates to define the time range for commits.",
44
  allow_flagging="never",
45
  theme="default",
46
+ analytics_enabled=False
 
 
 
 
47
  )
48
 
49
  # Launch the app