Yoxas commited on
Commit
08fa5db
·
verified ·
1 Parent(s): 57eb8dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -3,11 +3,12 @@ from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
3
  import spaces
4
 
5
  # Load the tokenizer and model
6
- tokenizer = AutoTokenizer.from_pretrained("Yoxas/autotrain-phi3-statistical", trust_remote_code=True)
7
- model = AutoModelForCausalLM.from_pretrained("Yoxas/autotrain-phi3-statistical", trust_remote_code=True)
 
8
 
9
  # Use a pipeline as a high-level helper
10
- pipe = pipeline("text-generation", model=model, tokenizer=tokenizer, trust_remote_code=True)
11
 
12
  # Define the chatbot function
13
  @spaces.GPU(duration=120)
 
3
  import spaces
4
 
5
  # Load the tokenizer and model
6
+
7
+ tokenizer = AutoTokenizer.from_pretrained("Yoxas/autotrain-gpt2-statistical1")
8
+ model = AutoModelForCausalLM.from_pretrained("Yoxas/autotrain-gpt2-statistical1")
9
 
10
  # Use a pipeline as a high-level helper
11
+ pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
12
 
13
  # Define the chatbot function
14
  @spaces.GPU(duration=120)