mmaguero commited on
Commit
beb38a6
1 Parent(s): 6c98fb4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -2,6 +2,7 @@ import streamlit as st
2
  import pandas as pd
3
  #from streamlit import cli as stcli
4
  from streamlit.web import cli as stcli
 
5
  from transformers import pipeline
6
  from sentence_transformers import SentenceTransformer, util
7
  import sys
@@ -64,7 +65,8 @@ def main(text,semantic_text,history_keyword_text):
64
 
65
 
66
  if __name__ == '__main__':
67
- if st._is_running_with_streamlit:
 
68
  st.markdown("""
69
  # Auto-Complete
70
  This is an example of an auto-complete approach where the next token suggested based on users's history
 
2
  import pandas as pd
3
  #from streamlit import cli as stcli
4
  from streamlit.web import cli as stcli
5
+ from streamlit import runtime
6
  from transformers import pipeline
7
  from sentence_transformers import SentenceTransformer, util
8
  import sys
 
65
 
66
 
67
  if __name__ == '__main__':
68
+ #if st._is_running_with_streamlit:
69
+ if runtime.exists():
70
  st.markdown("""
71
  # Auto-Complete
72
  This is an example of an auto-complete approach where the next token suggested based on users's history