avfranco commited on
Commit
5a9d4d6
·
1 Parent(s): e1c6f35

ea4all-gradio-agents-mcp-hackathon-ui-retrofit

Browse files
Files changed (1) hide show
  1. ea4all/ea4all_mcp.py +11 -7
ea4all/ea4all_mcp.py CHANGED
@@ -369,6 +369,10 @@ with gr.Blocks(title="Your ArchitectGPT",fill_height=True, fill_width=True) as e
369
  Streamline the architecture operating model, taking the best of agentic workflows and architects working together.
370
  """
371
 
 
 
 
 
372
  #EA4ALL-Agentic system menu
373
  with gr.Tabs(selected="how_to") as tabs:
374
  with gr.Tab(label="Architect Demand Management"):
@@ -403,7 +407,7 @@ with gr.Blocks(title="Your ArchitectGPT",fill_height=True, fill_width=True) as e
403
  with gr.Tabs(selected="id_dbr") as tabs_reference_architecture:
404
  with gr.Tab(label='Business Requirement', id="id_dbr"):
405
  gr.Markdown(value=agentic_togaf_desc)
406
- dbr_text=gr.TextArea(value=init_dbr, lines=14, interactive=True)
407
  with gr.Row():
408
  dbr_file=gr.File(
409
  value=e4u._join_paths(BaseConfiguration.ea4all_store, gra.dbr_mock),
@@ -462,10 +466,10 @@ with gr.Blocks(title="Your ArchitectGPT",fill_height=True, fill_width=True) as e
462
  container=True,
463
  interactive=False,
464
  )
465
- gr.Markdown(UIUtils.ea4all_about)
466
 
467
  #Podcast upload progress
468
- podcast.change(show_progress='full', show_api=False,)
469
 
470
  #Togaf upload file
471
  #dbr_file.clear(unload_dbr,outputs=dbr_text)
@@ -474,22 +478,22 @@ with gr.Blocks(title="Your ArchitectGPT",fill_height=True, fill_width=True) as e
474
  #dbr_cls.click(off_dbrtext,outputs=[dbr_text, tabs_togaf, tab_diagram])
475
 
476
  #Refactored ea4all_chatbot / vqa_chatbot (ChatInterface -> Chatbot)
477
- qna_prompt.submit(run_qna_agentic_system,[qna_prompt,ea4all_chatbot],ea4all_chatbot)
478
  #qna_prompt.submit(lambda: "", None, [qna_prompt])
479
  #ea4all_chatbot.like(fn=get_user_feedback)
480
  #qna_examples.input(lambda value: value, qna_examples, qna_prompt)
481
 
482
  #Execute Reference Architecture
483
- dbr_run.click(run_reference_architecture_agentic_system,show_progress='full',inputs=[dbr_text],outputs=[togaf_vision,tabs_togaf,tabs_reference_architecture, architecture_runway, diagram_header, tab_diagram])
484
 
485
  chat_msg = vqa_prompt.submit(UIUtils.add_message, [vqa_prompt, ea4all_vqa], [vqa_prompt, ea4all_vqa], show_api=False)
486
- bot_msg = chat_msg.then(run_vqa_agentic_system, [vqa_prompt, ea4all_vqa], ea4all_vqa, api_name="bot_response")
487
 
488
  #ea4all_vqa.like(fn=get_user_feedback)
489
  #vqa_examples.input(lambda value: value, vqa_examples, vqa_prompt)
490
 
491
  #Invoke CrewAI PMO Agentic System
492
- pmo_prompt.submit(run_pmo_agentic_system,[pmo_prompt,pmo_chatbot],pmo_chatbot)
493
  pmo_prompt.submit(lambda: "", None, [pmo_prompt], show_api=False)
494
  #pmo_examples.input(lambda value: value, pmo_examples, pmo_prompt)
495
 
 
369
  Streamline the architecture operating model, taking the best of agentic workflows and architects working together.
370
  """
371
 
372
+ #Wrapper for functions not to be exposed by the MCP Server
373
+ wrapper = gr.Button(visible=False) #wrapper.click(UIUtils.ea4all_about, show_api=False,)
374
+ wrapper1 = gr.Button(visible=False) #wrapper1.click(init_dbr, show_api=False,)
375
+
376
  #EA4ALL-Agentic system menu
377
  with gr.Tabs(selected="how_to") as tabs:
378
  with gr.Tab(label="Architect Demand Management"):
 
407
  with gr.Tabs(selected="id_dbr") as tabs_reference_architecture:
408
  with gr.Tab(label='Business Requirement', id="id_dbr"):
409
  gr.Markdown(value=agentic_togaf_desc)
410
+ dbr_text=gr.TextArea(value=wrapper1.click(init_dbr,show_api=False), lines=14, interactive=True)
411
  with gr.Row():
412
  dbr_file=gr.File(
413
  value=e4u._join_paths(BaseConfiguration.ea4all_store, gra.dbr_mock),
 
466
  container=True,
467
  interactive=False,
468
  )
469
+ gr.Markdown(value=wrapper.click(UIUtils.ea4all_about, show_api=False))
470
 
471
  #Podcast upload progress
472
+ podcast.change(show_progress='full', show_api=False)
473
 
474
  #Togaf upload file
475
  #dbr_file.clear(unload_dbr,outputs=dbr_text)
 
478
  #dbr_cls.click(off_dbrtext,outputs=[dbr_text, tabs_togaf, tab_diagram])
479
 
480
  #Refactored ea4all_chatbot / vqa_chatbot (ChatInterface -> Chatbot)
481
+ qna_prompt.submit(run_qna_agentic_system,[qna_prompt,ea4all_chatbot],ea4all_chatbot, api_name="landscape_answering_agent")
482
  #qna_prompt.submit(lambda: "", None, [qna_prompt])
483
  #ea4all_chatbot.like(fn=get_user_feedback)
484
  #qna_examples.input(lambda value: value, qna_examples, qna_prompt)
485
 
486
  #Execute Reference Architecture
487
+ dbr_run.click(run_reference_architecture_agentic_system,show_progress='full',inputs=[dbr_text],outputs=[togaf_vision,tabs_togaf,tabs_reference_architecture, architecture_runway, diagram_header, tab_diagram], api_name="togaf_blueprint_generation")
488
 
489
  chat_msg = vqa_prompt.submit(UIUtils.add_message, [vqa_prompt, ea4all_vqa], [vqa_prompt, ea4all_vqa], show_api=False)
490
+ bot_msg = chat_msg.then(run_vqa_agentic_system, [vqa_prompt, ea4all_vqa], ea4all_vqa, api_name="diagram_answering_agent")
491
 
492
  #ea4all_vqa.like(fn=get_user_feedback)
493
  #vqa_examples.input(lambda value: value, vqa_examples, vqa_prompt)
494
 
495
  #Invoke CrewAI PMO Agentic System
496
+ pmo_prompt.submit(run_pmo_agentic_system,[pmo_prompt,pmo_chatbot],pmo_chatbot, api_name="architect_demand_agent")
497
  pmo_prompt.submit(lambda: "", None, [pmo_prompt], show_api=False)
498
  #pmo_examples.input(lambda value: value, pmo_examples, pmo_prompt)
499