Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -49,23 +49,14 @@ def send_verification_sms():
|
|
49 |
# Load the API key from an environment variable
|
50 |
api_key = os.getenv('API_KEY')
|
51 |
tf.useKey(api_key)
|
52 |
-
#tf.sendSMS("+19522583980", "Test 2")
|
53 |
-
|
54 |
base_url = "https://huggingface.co/spaces/awacke1/RT-SMS-Phone-Verify"
|
55 |
base_url2 = "huggingface.co/spaces/awacke1/RT-SMS-Phone-Verify" # SMS - remove the https:// since SMS only likes plain text links without protocol
|
56 |
-
|
57 |
-
# Correct the sendSMS function call
|
58 |
-
#phone=st.session_state['phone_number']
|
59 |
phone=user_phone_input
|
|
|
60 |
st.write('Sending SMS to phone number ' + phone)
|
61 |
-
|
62 |
hashmessage=f"Verify here: {base_url}?hash={st.session_state['password']}"
|
63 |
hashmessage2=f"Verify here {base_url}?hash={st.session_state['password']}"
|
64 |
-
|
65 |
-
st.write('Hash message: ' + hashmessage)
|
66 |
-
|
67 |
-
#result = tf.sendSMS(phone, hashmessage)
|
68 |
-
#result = tf.sendSMS(phone, "Test 3") #works
|
69 |
result = tf.sendSMS(phone, hashmessage2)
|
70 |
|
71 |
if(result.ok):
|
|
|
49 |
# Load the API key from an environment variable
|
50 |
api_key = os.getenv('API_KEY')
|
51 |
tf.useKey(api_key)
|
|
|
|
|
52 |
base_url = "https://huggingface.co/spaces/awacke1/RT-SMS-Phone-Verify"
|
53 |
base_url2 = "huggingface.co/spaces/awacke1/RT-SMS-Phone-Verify" # SMS - remove the https:// since SMS only likes plain text links without protocol
|
|
|
|
|
|
|
54 |
phone=user_phone_input
|
55 |
+
phone_session=st.session_state['phone_number']
|
56 |
st.write('Sending SMS to phone number ' + phone)
|
|
|
57 |
hashmessage=f"Verify here: {base_url}?hash={st.session_state['password']}"
|
58 |
hashmessage2=f"Verify here {base_url}?hash={st.session_state['password']}"
|
59 |
+
#st.write('Hash message: ' + hashmessage)
|
|
|
|
|
|
|
|
|
60 |
result = tf.sendSMS(phone, hashmessage2)
|
61 |
|
62 |
if(result.ok):
|