Simon Strandgaard
commited on
Commit
·
61db3dc
1
Parent(s):
ea9b4a7
The top header is now hidden on Hugging Face Spaces
Browse files
src/plan/app_text2plan.py
CHANGED
|
@@ -33,6 +33,7 @@ IS_HUGGINGFACE_SPACES = is_huggingface_spaces()
|
|
| 33 |
@dataclass
|
| 34 |
class Config:
|
| 35 |
use_uuid_as_run_id: bool
|
|
|
|
| 36 |
visible_open_output_dir_button: bool
|
| 37 |
visible_openrouter_api_key_textbox: bool
|
| 38 |
allow_only_openrouter_models: bool
|
|
@@ -40,6 +41,7 @@ class Config:
|
|
| 40 |
|
| 41 |
CONFIG_LOCAL = Config(
|
| 42 |
use_uuid_as_run_id=False,
|
|
|
|
| 43 |
visible_open_output_dir_button=True,
|
| 44 |
visible_openrouter_api_key_textbox=False,
|
| 45 |
allow_only_openrouter_models=False,
|
|
@@ -47,6 +49,7 @@ CONFIG_LOCAL = Config(
|
|
| 47 |
)
|
| 48 |
CONFIG_HUGGINGFACE_SPACES = Config(
|
| 49 |
use_uuid_as_run_id=True,
|
|
|
|
| 50 |
visible_open_output_dir_button=False,
|
| 51 |
visible_openrouter_api_key_textbox=True,
|
| 52 |
allow_only_openrouter_models=True,
|
|
@@ -382,7 +385,7 @@ def initialize_settings(session_state: SessionState):
|
|
| 382 |
|
| 383 |
# Build the Gradio UI using Blocks.
|
| 384 |
with gr.Blocks(title="PlanExe") as demo_text2plan:
|
| 385 |
-
gr.Markdown("# PlanExe: crack open pandora’s box of ideas")
|
| 386 |
with gr.Tab("Main"):
|
| 387 |
with gr.Row():
|
| 388 |
with gr.Column(scale=2, min_width=300):
|
|
|
|
| 33 |
@dataclass
|
| 34 |
class Config:
|
| 35 |
use_uuid_as_run_id: bool
|
| 36 |
+
visible_top_header: bool
|
| 37 |
visible_open_output_dir_button: bool
|
| 38 |
visible_openrouter_api_key_textbox: bool
|
| 39 |
allow_only_openrouter_models: bool
|
|
|
|
| 41 |
|
| 42 |
CONFIG_LOCAL = Config(
|
| 43 |
use_uuid_as_run_id=False,
|
| 44 |
+
visible_top_header=True,
|
| 45 |
visible_open_output_dir_button=True,
|
| 46 |
visible_openrouter_api_key_textbox=False,
|
| 47 |
allow_only_openrouter_models=False,
|
|
|
|
| 49 |
)
|
| 50 |
CONFIG_HUGGINGFACE_SPACES = Config(
|
| 51 |
use_uuid_as_run_id=True,
|
| 52 |
+
visible_top_header=False,
|
| 53 |
visible_open_output_dir_button=False,
|
| 54 |
visible_openrouter_api_key_textbox=True,
|
| 55 |
allow_only_openrouter_models=True,
|
|
|
|
| 385 |
|
| 386 |
# Build the Gradio UI using Blocks.
|
| 387 |
with gr.Blocks(title="PlanExe") as demo_text2plan:
|
| 388 |
+
gr.Markdown("# PlanExe: crack open pandora’s box of ideas", visible=CONFIG.visible_top_header)
|
| 389 |
with gr.Tab("Main"):
|
| 390 |
with gr.Row():
|
| 391 |
with gr.Column(scale=2, min_width=300):
|