Simon Strandgaard
commited on
Commit
·
2ac4e20
1
Parent(s):
b69e7a3
comments
Browse files
src/huggingface_spaces/app_state1.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
"""
|
2 |
Multi-user experiment. User data is isolated from other users.
|
|
|
3 |
When the page is open in multiple tabs, then each tab is isolated from the other tabs.
|
4 |
-
|
5 |
However when the user reloads the page, the API key is lost.
|
6 |
"""
|
7 |
import gradio as gr
|
|
|
1 |
"""
|
2 |
Multi-user experiment. User data is isolated from other users.
|
3 |
+
Store one parameter in State.
|
4 |
When the page is open in multiple tabs, then each tab is isolated from the other tabs.
|
|
|
5 |
However when the user reloads the page, the API key is lost.
|
6 |
"""
|
7 |
import gradio as gr
|
src/huggingface_spaces/app_state2.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
"""
|
2 |
Multi-user experiment. User data is isolated from other users.
|
|
|
3 |
When the page is open in multiple tabs, the API key is shared across all tabs.
|
4 |
When the user reloads the page, the API key is remembered.
|
5 |
When the server is restarted, the API key is remembered.
|
|
|
1 |
"""
|
2 |
Multi-user experiment. User data is isolated from other users.
|
3 |
+
Store one parameter in BrowserState.
|
4 |
When the page is open in multiple tabs, the API key is shared across all tabs.
|
5 |
When the user reloads the page, the API key is remembered.
|
6 |
When the server is restarted, the API key is remembered.
|
src/huggingface_spaces/app_state4.py
CHANGED
@@ -1,10 +1,9 @@
|
|
1 |
"""
|
2 |
Multi-user experiment. User data is isolated from other users.
|
|
|
3 |
When the page is open in multiple tabs, the API key is shared across all tabs.
|
4 |
When the user reloads the page, the API key is remembered.
|
5 |
When the server is restarted, the API key is remembered.
|
6 |
-
|
7 |
-
Store multiple settings.
|
8 |
"""
|
9 |
import gradio as gr
|
10 |
import json
|
|
|
1 |
"""
|
2 |
Multi-user experiment. User data is isolated from other users.
|
3 |
+
Store multiple parameters in BrowserState.
|
4 |
When the page is open in multiple tabs, the API key is shared across all tabs.
|
5 |
When the user reloads the page, the API key is remembered.
|
6 |
When the server is restarted, the API key is remembered.
|
|
|
|
|
7 |
"""
|
8 |
import gradio as gr
|
9 |
import json
|