xd11yggy commited on
Commit
453661e
Β·
verified Β·
1 Parent(s): 0fefa24

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -5,12 +5,12 @@ import re
5
  import time
6
  from datetime import datetime
7
 
8
- current_date = datetime.now().strftime("%d:%m:%Y")
9
- current_time = datetime.now().strftime("%H:%M")
10
-
11
  web_search = DuckDuckGoSearchTool()
12
 
13
- SYSTEM_PROMPT = f'''
 
 
 
14
  You are a methodical web search agent designed to solve complex tasks through iterative, step-by-step web searches. Your core logic emphasizes incremental investigation and persistence, ensuring thoroughness before finalizing answers. Your main power - step-by-step web search.
15
 
16
  Current date day/month/year: {current_date}
@@ -211,7 +211,7 @@ def respond(
211
  demo = gr.ChatInterface(
212
  respond,
213
  additional_inputs=[
214
- gr.Textbox(value=SYSTEM_PROMPT, label="System Prompt", lines=8),
215
  gr.Textbox(
216
  value="google/gemini-2.0-pro-exp-02-05:free", # Default model
217
  label="Model",
 
5
  import time
6
  from datetime import datetime
7
 
 
 
 
8
  web_search = DuckDuckGoSearchTool()
9
 
10
+ def get_system_prompt():
11
+ current_date = datetime.now().strftime("%d:%m:%Y")
12
+ current_time = datetime.now().strftime("%H:%M")
13
+ return f'''
14
  You are a methodical web search agent designed to solve complex tasks through iterative, step-by-step web searches. Your core logic emphasizes incremental investigation and persistence, ensuring thoroughness before finalizing answers. Your main power - step-by-step web search.
15
 
16
  Current date day/month/year: {current_date}
 
211
  demo = gr.ChatInterface(
212
  respond,
213
  additional_inputs=[
214
+ gr.Textbox(value=get_system_prompt, label="System Prompt", lines=8),
215
  gr.Textbox(
216
  value="google/gemini-2.0-pro-exp-02-05:free", # Default model
217
  label="Model",