Simon Strandgaard
commited on
Commit
·
cd2e83b
1
Parent(s):
2d55e29
Invoking app.py now opens the app_text2plan gradio UI
Browse files- app.py +2 -1
- src/plan/app_text2plan.py +5 -4
app.py
CHANGED
@@ -4,6 +4,7 @@ import gradio as gr
|
|
4 |
from huggingface_hub import InferenceClient
|
5 |
from src.prompt.prompt_catalog import PromptCatalog
|
6 |
from src.llm_factory import get_llm
|
|
|
7 |
from llama_index.core.llms import ChatMessage
|
8 |
|
9 |
if False:
|
@@ -104,4 +105,4 @@ demo = gr.ChatInterface(
|
|
104 |
|
105 |
|
106 |
if __name__ == "__main__":
|
107 |
-
|
|
|
4 |
from huggingface_hub import InferenceClient
|
5 |
from src.prompt.prompt_catalog import PromptCatalog
|
6 |
from src.llm_factory import get_llm
|
7 |
+
from src.plan.app_text2plan import demo_text2plan
|
8 |
from llama_index.core.llms import ChatMessage
|
9 |
|
10 |
if False:
|
|
|
105 |
|
106 |
|
107 |
if __name__ == "__main__":
|
108 |
+
demo_text2plan.launch()
|
src/plan/app_text2plan.py
CHANGED
@@ -268,7 +268,7 @@ def open_output_dir():
|
|
268 |
return f"Failed to open directory: {e}"
|
269 |
|
270 |
# Build the Gradio UI using Blocks.
|
271 |
-
with gr.Blocks(title="PlanExe") as
|
272 |
gr.Markdown("# PlanExe: crack open pandora’s box of ideas")
|
273 |
with gr.Tab("Main"):
|
274 |
with gr.Row():
|
@@ -326,7 +326,8 @@ with gr.Blocks(title="PlanExe") as demo:
|
|
326 |
retry_btn.click(fn=run_planner, inputs=[retry_btn, prompt_input, model_radio, speedvsdetail_radio], outputs=output_markdown)
|
327 |
open_dir_btn.click(fn=open_output_dir, outputs=status_markdown)
|
328 |
|
329 |
-
|
|
|
330 |
|
331 |
-
print("Press Ctrl+C to exit.")
|
332 |
-
|
|
|
268 |
return f"Failed to open directory: {e}"
|
269 |
|
270 |
# Build the Gradio UI using Blocks.
|
271 |
+
with gr.Blocks(title="PlanExe") as demo_text2plan:
|
272 |
gr.Markdown("# PlanExe: crack open pandora’s box of ideas")
|
273 |
with gr.Tab("Main"):
|
274 |
with gr.Row():
|
|
|
326 |
retry_btn.click(fn=run_planner, inputs=[retry_btn, prompt_input, model_radio, speedvsdetail_radio], outputs=output_markdown)
|
327 |
open_dir_btn.click(fn=open_output_dir, outputs=status_markdown)
|
328 |
|
329 |
+
if __name__ == "__main__":
|
330 |
+
# print("Environment variables Gradio:\n" + get_env_as_string() + "\n\n\n")
|
331 |
|
332 |
+
print("Press Ctrl+C to exit.")
|
333 |
+
demo_text2plan.launch()
|