Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,18 +3,24 @@ import transformers
|
|
3 |
import altair as alt
|
4 |
import pandas as pd
|
5 |
import streamlit_authenticator as stauth
|
|
|
6 |
from difflib import SequenceMatcher
|
7 |
|
8 |
# ------------------------------
|
9 |
# User Authentication Setup
|
10 |
# ------------------------------
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
12 |
config = {
|
13 |
'credentials': {
|
14 |
'usernames': {
|
15 |
'demo_user': {
|
16 |
'name': 'Demo User',
|
17 |
-
'password':
|
18 |
}
|
19 |
}
|
20 |
},
|
|
|
3 |
import altair as alt
|
4 |
import pandas as pd
|
5 |
import streamlit_authenticator as stauth
|
6 |
+
import bcrypt
|
7 |
from difflib import SequenceMatcher
|
8 |
|
9 |
# ------------------------------
|
10 |
# User Authentication Setup
|
11 |
# ------------------------------
|
12 |
+
|
13 |
+
# Manually hash the password using bcrypt
|
14 |
+
plain_password = "password123"
|
15 |
+
hashed_password = bcrypt.hashpw(plain_password.encode('utf-8'), bcrypt.gensalt()).decode('utf-8')
|
16 |
+
|
17 |
+
# Configuration for authentication
|
18 |
config = {
|
19 |
'credentials': {
|
20 |
'usernames': {
|
21 |
'demo_user': {
|
22 |
'name': 'Demo User',
|
23 |
+
'password': hashed_password # use the manually hashed password
|
24 |
}
|
25 |
}
|
26 |
},
|