Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -556,8 +556,6 @@ def textbox(text, box="AI", name="Philippe"):
|
|
556 |
|
557 |
# Authentication
|
558 |
#openai.api_key = os.getenv("OPENAI_KEY")
|
559 |
-
USERNAME_PASSWORD_ACTIVE_PAIRS = os.environ['VALID_USERNAME_PASSWORD_PAIRS']
|
560 |
-
print(USERNAME_PASSWORD_ACTIVE_PAIRS)
|
561 |
# Define Layout
|
562 |
conversation = html.Div(
|
563 |
html.Div(id="display-conversation"),
|
@@ -604,13 +602,10 @@ class CustomDash(Dash):
|
|
604 |
renderer=kwargs['renderer'])
|
605 |
|
606 |
#app = Dash(__name__, external_scripts=external_scripts, external_stylesheets=dmc.styles.ALL, on_error=custom_error_handler)
|
607 |
-
VALID_USERNAME_PASSWORD_PAIRS =
|
608 |
-
'hello': 'world'
|
609 |
-
}
|
610 |
app = CustomDash(__name__, server=server, external_scripts=external_scripts, external_stylesheets=dmc.styles.ALL, on_error=custom_error_handler)
|
611 |
-
BasicAuth(app, VALID_USERNAME_PASSWORD_PAIRS)
|
612 |
-
print(
|
613 |
-
print(BasicAuth(app, VALID_USERNAME_PASSWORD_PAIRS))
|
614 |
|
615 |
def connexion_France_Travail():
|
616 |
client = Api(client_id=os.getenv('POLE_EMPLOI_CLIENT_ID'),
|
|
|
556 |
|
557 |
# Authentication
|
558 |
#openai.api_key = os.getenv("OPENAI_KEY")
|
|
|
|
|
559 |
# Define Layout
|
560 |
conversation = html.Div(
|
561 |
html.Div(id="display-conversation"),
|
|
|
602 |
renderer=kwargs['renderer'])
|
603 |
|
604 |
#app = Dash(__name__, external_scripts=external_scripts, external_stylesheets=dmc.styles.ALL, on_error=custom_error_handler)
|
605 |
+
VALID_USERNAME_PASSWORD_PAIRS = os.getenv('VALID_USERNAME_PASSWORD_PAIRS')
|
|
|
|
|
606 |
app = CustomDash(__name__, server=server, external_scripts=external_scripts, external_stylesheets=dmc.styles.ALL, on_error=custom_error_handler)
|
607 |
+
auth = BasicAuth(app, VALID_USERNAME_PASSWORD_PAIRS)
|
608 |
+
print(auth[0])
|
|
|
609 |
|
610 |
def connexion_France_Travail():
|
611 |
client = Api(client_id=os.getenv('POLE_EMPLOI_CLIENT_ID'),
|