Tuana commited on
Commit
391c720
1 Parent(s): fdb83a6

reverting to streamlit 1.17 for HF

Browse files
Files changed (3) hide show
  1. README.md +1 -1
  2. requirements.txt +1 -1
  3. utils/haystack.py +4 -2
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 🦄
4
  colorFrom: pink
5
  colorTo: yellow
6
  sdk: streamlit
7
- sdk_version: 1.18.0
8
  app_file: app.py
9
  pinned: false
10
  ---
 
4
  colorFrom: pink
5
  colorTo: yellow
6
  sdk: streamlit
7
+ sdk_version: 1.17.0
8
  app_file: app.py
9
  pinned: false
10
  ---
requirements.txt CHANGED
@@ -1,5 +1,5 @@
1
  git+https://github.com/deepset-ai/haystack.git@openai/token_limit#egg=farm-haystack
2
- streamlit==1.18.0
3
  markdown
4
  st-annotated-text
5
  python-dotenv
 
1
  git+https://github.com/deepset-ai/haystack.git@openai/token_limit#egg=farm-haystack
2
+ streamlit==1.17.0
3
  markdown
4
  st-annotated-text
5
  python-dotenv
utils/haystack.py CHANGED
@@ -5,7 +5,9 @@ from utils.config import TWITTER_BEARER, OEPN_AI_KEY
5
  from haystack.nodes import PromptNode, PromptTemplate
6
 
7
  # cached to make index and models load only at start
8
- @st.cache_resource
 
 
9
  def start_haystack():
10
  #Use this function to contruct a pipeline
11
  prompt_node = PromptNode(model_name_or_path="text-davinci-003", api_key=OEPN_AI_KEY)
@@ -39,7 +41,7 @@ def start_haystack():
39
 
40
  prompter, template = start_haystack()
41
 
42
- @st.cache_data(show_spinner=False)
43
  def query(username):
44
 
45
  bearer_token = TWITTER_BEARER
 
5
  from haystack.nodes import PromptNode, PromptTemplate
6
 
7
  # cached to make index and models load only at start
8
+ @st.cache(
9
+ hash_funcs={"builtins.SwigPyObject": lambda _: None}, allow_output_mutation=True
10
+ )
11
  def start_haystack():
12
  #Use this function to contruct a pipeline
13
  prompt_node = PromptNode(model_name_or_path="text-davinci-003", api_key=OEPN_AI_KEY)
 
41
 
42
  prompter, template = start_haystack()
43
 
44
+ @st.cache(show_spinner=False, allow_output_mutation=True)
45
  def query(username):
46
 
47
  bearer_token = TWITTER_BEARER