Simon Strandgaard
commited on
Commit
·
3af7479
1
Parent(s):
08d4036
I think the state is now being across server restart
Browse files- app.py +1 -1
- src/huggingface_spaces/app_state2.py +1 -1
app.py
CHANGED
@@ -7,5 +7,5 @@ if __name__ == "__main__":
|
|
7 |
# print_gradio_info()
|
8 |
# from src.plan.app_text2plan import run_app_text2plan
|
9 |
# run_app_text2plan()
|
10 |
-
from src.huggingface_spaces.
|
11 |
demo.launch()
|
|
|
7 |
# print_gradio_info()
|
8 |
# from src.plan.app_text2plan import run_app_text2plan
|
9 |
# run_app_text2plan()
|
10 |
+
from src.huggingface_spaces.app_state2 import demo
|
11 |
demo.launch()
|
src/huggingface_spaces/app_state2.py
CHANGED
@@ -23,7 +23,7 @@ with gr.Blocks() as demo:
|
|
23 |
|
24 |
# Create a BrowserState component.
|
25 |
# The initial value is an empty string, and the key "api_key" is used to store/retrieve the value.
|
26 |
-
browser_state = gr.BrowserState("")
|
27 |
|
28 |
with gr.Row():
|
29 |
api_key_input = gr.Textbox(label="Enter your API Key", elem_id="api_key_input")
|
|
|
23 |
|
24 |
# Create a BrowserState component.
|
25 |
# The initial value is an empty string, and the key "api_key" is used to store/retrieve the value.
|
26 |
+
browser_state = gr.BrowserState("", storage_key="Test", secret="Test")
|
27 |
|
28 |
with gr.Row():
|
29 |
api_key_input = gr.Textbox(label="Enter your API Key", elem_id="api_key_input")
|