Abbeite commited on
Commit
6a44c25
1 Parent(s): a159960

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -5,8 +5,9 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
5
  # Set the logger to display only CRITICAL messages
6
  logging.basicConfig(level=logging.CRITICAL)
7
 
 
8
  # Cache the model and tokenizer to avoid reloading it every time
9
- @st.cache_resource.(allow_output_mutation=True, suppress_st_warning=True)
10
  def load_model():
11
  model_name = "Abbeite/chest_and_physical_limitations" # Replace with your actual model name
12
  tokenizer = AutoTokenizer.from_pretrained(model_name)
 
5
  # Set the logger to display only CRITICAL messages
6
  logging.basicConfig(level=logging.CRITICAL)
7
 
8
+
9
  # Cache the model and tokenizer to avoid reloading it every time
10
+ @st.experimental_singleton
11
  def load_model():
12
  model_name = "Abbeite/chest_and_physical_limitations" # Replace with your actual model name
13
  tokenizer = AutoTokenizer.from_pretrained(model_name)