Spaces:
Running
on
Zero
Running
on
Zero
print token, ssr back on
Browse files
app.py
CHANGED
@@ -158,6 +158,12 @@ def predict(request: gr.Request, text_input, sample_size_slider, reduce_sample_c
|
|
158 |
"""
|
159 |
# Get the authentication token
|
160 |
token = _get_token(request)
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
|
162 |
# Check if input is empty or whitespace
|
163 |
print(f"Input: {text_input}")
|
|
|
158 |
"""
|
159 |
# Get the authentication token
|
160 |
token = _get_token(request)
|
161 |
+
|
162 |
+
|
163 |
+
payload = token.split('.')[1]
|
164 |
+
payload = f"{payload}{'=' * ((4 - len(payload) % 4) % 4)}"
|
165 |
+
payload = json.loads(base64.urlsafe_b64decode(payload).decode())
|
166 |
+
print(payload)
|
167 |
|
168 |
# Check if input is empty or whitespace
|
169 |
print(f"Input: {text_input}")
|