odaly commited on
Commit
e6d97fb
·
verified ·
1 Parent(s): 81ec1b1

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -94,7 +94,7 @@ max_length = st.sidebar.slider("Max Length", min_value=100, max_value=4048, valu
94
  # Load the model and tokenizer
95
  @st.cache_resource
96
  def load_model_and_tokenizer():
97
- model_path = "./gpt2-finetuned" # المسار المحلي للنموذج
98
  tokenizer = AutoTokenizer.from_pretrained(model_path, clean_up_tokenization_spaces=True)
99
  model = AutoModelForCausalLM.from_pretrained(model_path)
100
  return tokenizer, model
 
94
  # Load the model and tokenizer
95
  @st.cache_resource
96
  def load_model_and_tokenizer():
97
+ model_path = "gpt2" # المسار المحلي للنموذج
98
  tokenizer = AutoTokenizer.from_pretrained(model_path, clean_up_tokenization_spaces=True)
99
  model = AutoModelForCausalLM.from_pretrained(model_path)
100
  return tokenizer, model