odaly commited on
Commit
1baf5eb
·
verified ·
1 Parent(s): 3dfe622

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.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 = "C:/Users/MC/Ollama_UI/gpt2-finetuned/checkpoint-416" # المسار المحلي للنموذج
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