Spaces:
Running
Running
wwwillchen
commited on
Commit
·
3250263
1
Parent(s):
ab59c2b
Fix security policy
Browse files
main.py
CHANGED
@@ -79,9 +79,14 @@ STYLESHEETS = [
|
|
79 |
"https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=swap"
|
80 |
]
|
81 |
|
|
|
|
|
|
|
|
|
82 |
@me.page(
|
83 |
path="/",
|
84 |
stylesheets=STYLESHEETS,
|
|
|
85 |
)
|
86 |
def home_page():
|
87 |
model_picker_dialog()
|
@@ -138,7 +143,7 @@ def click_example(e: me.ClickEvent):
|
|
138 |
state = me.state(State)
|
139 |
state.input = e.key
|
140 |
|
141 |
-
@me.page(path="/conversation", stylesheets=STYLESHEETS)
|
142 |
def conversation_page():
|
143 |
state = me.state(State)
|
144 |
model_picker_dialog()
|
|
|
79 |
"https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=swap"
|
80 |
]
|
81 |
|
82 |
+
SECURITY_POLICY = me.SecurityPolicy(
|
83 |
+
allowed_iframe_parents=["https://huggingface.co"]
|
84 |
+
)
|
85 |
+
|
86 |
@me.page(
|
87 |
path="/",
|
88 |
stylesheets=STYLESHEETS,
|
89 |
+
security_policy=SECURITY_POLICY,
|
90 |
)
|
91 |
def home_page():
|
92 |
model_picker_dialog()
|
|
|
143 |
state = me.state(State)
|
144 |
state.input = e.key
|
145 |
|
146 |
+
@me.page(path="/conversation", stylesheets=STYLESHEETS, security_policy=SECURITY_POLICY)
|
147 |
def conversation_page():
|
148 |
state = me.state(State)
|
149 |
model_picker_dialog()
|