Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,12 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import AutoTokenizer
|
3 |
import json
|
|
|
4 |
|
5 |
# Load the tokenizer for the specified Gemma model
|
6 |
# This will download the tokenizer model from the Hugging Face Hub
|
7 |
try:
|
8 |
-
tokenizer = AutoTokenizer.from_pretrained("google/gemma-3-4b-it")
|
9 |
print("Tokenizer loaded successfully.")
|
10 |
except Exception as e:
|
11 |
print(f"Error loading tokenizer: {e}")
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import AutoTokenizer
|
3 |
import json
|
4 |
+
import os
|
5 |
|
6 |
# Load the tokenizer for the specified Gemma model
|
7 |
# This will download the tokenizer model from the Hugging Face Hub
|
8 |
try:
|
9 |
+
tokenizer = AutoTokenizer.from_pretrained("google/gemma-3-4b-it", token=os.environ["HF_TOKEN"])
|
10 |
print("Tokenizer loaded successfully.")
|
11 |
except Exception as e:
|
12 |
print(f"Error loading tokenizer: {e}")
|