m7n commited on
Commit
c1fe37c
·
1 Parent(s): 300b8a0

print token, ssr back on

Browse files
Files changed (1) hide show
  1. app.py +6 -0
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}")