Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app_gradio/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def get_data_column_mapping():
value=[["content", "content"]],
headers=["Field Key", "Dataset Column"],
datatype=["str", "str"],
col_count=(2, "fixed"),
column_count=(2, "fixed"),
row_count=(1, "dynamic"),
label="Field Mappings (add/remove rows as needed)",
interactive=True
Expand All @@ -417,7 +417,7 @@ def get_data_column_mapping():
# value=[],
# headers=["Rule Name", "threshold", "pattern", "key_list", "refer_path", "parameters"],
# datatype=["str", "number", "str", "str", "str", "str"],
# col_count=(6, "fixed"),
# column_count=(6, "fixed"),
# row_count=(0, "dynamic"),
# label="Rule Configurations (auto-generated based on rule_list selection)",
# interactive=True,
Expand All @@ -430,7 +430,7 @@ def get_data_column_mapping():
value=[],
headers=["LLM Name", "model", "key", "api_url", "parameters"],
datatype=["str", "str", "str", "str", "str"],
col_count=(5, "fixed"),
column_count=(5, "fixed"),
row_count=(0, "dynamic"),
label="LLM Configurations (auto-generated based on llm_list selection)",
interactive=True,
Expand Down Expand Up @@ -496,4 +496,4 @@ def get_data_column_mapping():
)

# Launch interface
demo.launch(share=True)
demo.launch(share=False)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While disabling sharing by default is a great security improvement, hardcoding share=False reduces flexibility. If there's a future need to enable sharing for a specific use case (e.g., a temporary demo for a remote colleague), it would require a code change. It's better practice to control this via an environment variable. This allows enabling sharing without modifying the code, by simply setting an environment variable before running the script.

Suggested change
demo.launch(share=False)
demo.launch(share=os.getenv("GRADIO_SHARE") == "True")