Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -556,8 +556,8 @@ def textbox(text, box="AI", name="Philippe"):
|
|
556 |
|
557 |
# Authentication
|
558 |
#openai.api_key = os.getenv("OPENAI_KEY")
|
559 |
-
|
560 |
-
|
561 |
# Define Layout
|
562 |
conversation = html.Div(
|
563 |
html.Div(id="display-conversation"),
|
@@ -604,11 +604,15 @@ 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 |
app = CustomDash(__name__, server=server, external_scripts=external_scripts, external_stylesheets=dmc.styles.ALL, on_error=custom_error_handler)
|
608 |
auth = dash_auth.BasicAuth(
|
609 |
app,
|
610 |
VALID_USERNAME_PASSWORD_PAIRS
|
611 |
)
|
|
|
612 |
def connexion_France_Travail():
|
613 |
client = Api(client_id=os.getenv('POLE_EMPLOI_CLIENT_ID'),
|
614 |
client_secret=os.getenv('POLE_EMPLOI_CLIENT_SECRET'))
|
|
|
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 |
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 |
auth = dash_auth.BasicAuth(
|
612 |
app,
|
613 |
VALID_USERNAME_PASSWORD_PAIRS
|
614 |
)
|
615 |
+
print(auth)
|
616 |
def connexion_France_Travail():
|
617 |
client = Api(client_id=os.getenv('POLE_EMPLOI_CLIENT_ID'),
|
618 |
client_secret=os.getenv('POLE_EMPLOI_CLIENT_SECRET'))
|