Doubleupai commited on
Commit
533f676
·
verified ·
1 Parent(s): 6e21361

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1,10 +1,10 @@
1
  import gradio as gr
2
- from transformers import AutoModelForCausalLM, AutoTokenizer
3
 
4
- # Load the model and tokenizer
5
  model_name = "sambanovasystems/SambaNova-Qwen2.5-Coder-Artifacts"
6
- tokenizer = AutoTokenizer.from_pretrained(model_name)
7
- model = AutoModelForCausalLM.from_pretrained(model_name)
8
 
9
  def generate_text(prompt):
10
  # Generate text using the model
 
1
  import gradio as gr
2
+ from transformers import AutoTokenizer, AutoModelForCausalLM
3
 
4
+ # Replace 'YOUR_ACCESS_TOKEN' with your actual Hugging Face access token
5
  model_name = "sambanovasystems/SambaNova-Qwen2.5-Coder-Artifacts"
6
+ tokenizer = AutoTokenizer.from_pretrained(model_name, use_auth_token='YOUR_ACCESS_TOKEN')
7
+ model = AutoModelForCausalLM.from_pretrained(model_name, use_auth_token='YOUR_ACCESS_TOKEN')
8
 
9
  def generate_text(prompt):
10
  # Generate text using the model