Spaces:
Runtime error
Runtime error
Doubleupai
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
-
from transformers import
|
3 |
|
4 |
-
#
|
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
|