Guiyom commited on
Commit
e8edadb
·
verified ·
1 Parent(s): a2689f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -813,25 +813,23 @@ def main():
813
  gr.Markdown("Input your API Keys, choose your search parameters (engine, depth, breadth, results, exclusions...), answer the clarifications questions and let the DeepSearch start.")
814
  gr.Image(value=display_image, height=300, width=300, interactive=False, show_label=False, show_download_button=False, show_share_button=False, show_fullscreen_button=False, elem_id="image")
815
 
816
- with gr.Accordion("API Keys", open=False):
817
  openai_api_key_input = gr.Textbox(label="OpenAI API Key", placeholder="Enter your OpenAI API Key here...", type="password")
818
  serpapi_api_key_input = gr.Textbox(label="SERPAPI API Key", placeholder="Enter your SERPAPI API Key here...", type="password")
819
  gr.Markdown("[Create OpenAI API Key](https://platform.openai.com/account/api-keys) | [Create SERPAPI API Key](https://serpapi.com/manage-api-key)")
820
  gr.Markdown("You can check the open-source code - None of the user API keys are stored or logged.")
821
 
822
- with gr.Accordion ("Research topic", open=False):
823
  with gr.Row():
824
  research_query = gr.Textbox(label="Research Query", placeholder="Enter your research query here...", lines=2, elem_id="research-query", scale=4)
825
- with gr.Column(scale=1):
826
- refine_query_button = gr.Button("Refine my Query")
827
- reportstyle = gr.Textbox(label="Report style", placeholder="The report style", lines=1, value="Academic style")
828
 
829
- with gr.Accordion("Q&A", open=False):
830
  with gr.Row():
831
  clarification_text = gr.Textbox(label="Clarification / Follow-Up Questions", placeholder="Tailored clarifying suggestions will appear here...", lines=6, scale = 4)
832
  gen_followups = gr.Button("Generate Tailored Clarification Questions", scale=1)
833
 
834
- with gr.Accordion("Search Parameters", open=False):
835
  with gr.Column():
836
  with gr.Row():
837
  with gr.Column():
@@ -840,7 +838,9 @@ def main():
840
  with gr.Column():
841
  pages_dropdown = gr.Dropdown(label="Report Length (pages)", choices=[str(i) for i in range(4, 41)], value="8")
842
  surprise_me_checkbox = gr.Checkbox(label="Surprise me", value=False)
843
- additional_clarifications = gr.Textbox(label="Additional Clarifications", placeholder="Clarifications to be applied between iterations", lines=2)
 
 
844
  selected_engines = gr.CheckboxGroup(label="Specific engines to Use (AI to choose by default)", choices=[
845
  "google",
846
  "google_jobs_listing",
@@ -864,9 +864,9 @@ def main():
864
  breadth = gr.Slider(label="Research Breadth (queries per iteration)", minimum=2, maximum=10, step=1, value=4)
865
  depth = gr.Slider(label="Research Depth (iterations)", minimum=1, maximum=5, step=1, value=2)
866
 
867
- progress_display = gr.Markdown("", elem_id="progress-display")
868
- run_btn = gr.Button("Run Deep Research")
869
  with gr.Accordion("Report", open=False, elem_classes="folder"):
 
 
870
  final_report = gr.Markdown(label="Final Report (Markdown)", height = 800, min_height = 50)
871
  with gr.Accordion("Generate PDF", open=False, elem_classes="folder"):
872
  with gr.Column():
 
813
  gr.Markdown("Input your API Keys, choose your search parameters (engine, depth, breadth, results, exclusions...), answer the clarifications questions and let the DeepSearch start.")
814
  gr.Image(value=display_image, height=300, width=300, interactive=False, show_label=False, show_download_button=False, show_share_button=False, show_fullscreen_button=False, elem_id="image")
815
 
816
+ with gr.Accordion("1] API Keys", open=False):
817
  openai_api_key_input = gr.Textbox(label="OpenAI API Key", placeholder="Enter your OpenAI API Key here...", type="password")
818
  serpapi_api_key_input = gr.Textbox(label="SERPAPI API Key", placeholder="Enter your SERPAPI API Key here...", type="password")
819
  gr.Markdown("[Create OpenAI API Key](https://platform.openai.com/account/api-keys) | [Create SERPAPI API Key](https://serpapi.com/manage-api-key)")
820
  gr.Markdown("You can check the open-source code - None of the user API keys are stored or logged.")
821
 
822
+ with gr.Accordion ("2] Research topic", open=False):
823
  with gr.Row():
824
  research_query = gr.Textbox(label="Research Query", placeholder="Enter your research query here...", lines=2, elem_id="research-query", scale=4)
825
+ refine_query_button = gr.Button("Refine my Query", scale=1)
 
 
826
 
827
+ with gr.Accordion("3] Q&A", open=False):
828
  with gr.Row():
829
  clarification_text = gr.Textbox(label="Clarification / Follow-Up Questions", placeholder="Tailored clarifying suggestions will appear here...", lines=6, scale = 4)
830
  gen_followups = gr.Button("Generate Tailored Clarification Questions", scale=1)
831
 
832
+ with gr.Accordion("4] Search Parameters", open=False):
833
  with gr.Column():
834
  with gr.Row():
835
  with gr.Column():
 
838
  with gr.Column():
839
  pages_dropdown = gr.Dropdown(label="Report Length (pages)", choices=[str(i) for i in range(4, 41)], value="8")
840
  surprise_me_checkbox = gr.Checkbox(label="Surprise me", value=False)
841
+ with gr.Column():
842
+ additional_clarifications = gr.Textbox(label="Additional Clarifications", placeholder="Clarifications to be applied between iterations", lines=2, scale=4)
843
+ reportstyle = gr.Textbox(label="Report style", placeholder="The report style", lines=1, value="Academic style", scale=1)
844
  selected_engines = gr.CheckboxGroup(label="Specific engines to Use (AI to choose by default)", choices=[
845
  "google",
846
  "google_jobs_listing",
 
864
  breadth = gr.Slider(label="Research Breadth (queries per iteration)", minimum=2, maximum=10, step=1, value=4)
865
  depth = gr.Slider(label="Research Depth (iterations)", minimum=1, maximum=5, step=1, value=2)
866
 
 
 
867
  with gr.Accordion("Report", open=False, elem_classes="folder"):
868
+ progress_display = gr.Markdown("", elem_id="progress-display")
869
+ run_btn = gr.Button("Generate report")
870
  final_report = gr.Markdown(label="Final Report (Markdown)", height = 800, min_height = 50)
871
  with gr.Accordion("Generate PDF", open=False, elem_classes="folder"):
872
  with gr.Column():