Verathagnus commited on
Commit
064d73b
·
verified ·
1 Parent(s): f40f57b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -11
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import numpy as np
2
  import pandas as pd
3
  import matplotlib.pyplot as plt
4
- #import re, spacy
5
  from time import time
6
  from sklearn.model_selection import train_test_split
7
  from tensorflow.keras.preprocessing.text import Tokenizer
@@ -308,18 +308,19 @@ School of Computer Science, UPES, Dehradun, India
308
  """
309
  components.html(footer)
310
  # Handling query parameters
311
- query = st.experimental_get_query_params()
312
  try:
313
  ## Look-up the tab from the query
314
- index_tab = query["tab"][0]
315
- ## Click on that tab
316
- js = f"""
317
- <script>
318
- var tab = window.parent.document.getElementById('tabs-bui2-tab-{index_tab}');
319
- tab.click();
320
- </script>
321
- """
322
- st.components.v1.html(js)
 
323
 
324
  except ValueError:
325
  ## Do nothing if the query parameter does not correspond to any of the tabs
 
1
  import numpy as np
2
  import pandas as pd
3
  import matplotlib.pyplot as plt
4
+ import re, spacy
5
  from time import time
6
  from sklearn.model_selection import train_test_split
7
  from tensorflow.keras.preprocessing.text import Tokenizer
 
308
  """
309
  components.html(footer)
310
  # Handling query parameters
311
+ query = st.query_params()
312
  try:
313
  ## Look-up the tab from the query
314
+ if "tab" in query:
315
+ index_tab = query["tab"][0]
316
+ ## Click on that tab
317
+ js = f"""
318
+ <script>
319
+ var tab = window.parent.document.getElementById('tabs-bui2-tab-{index_tab}');
320
+ tab.click();
321
+ </script>
322
+ """
323
+ st.components.v1.html(js)
324
 
325
  except ValueError:
326
  ## Do nothing if the query parameter does not correspond to any of the tabs