Spaces:
Runtime error
Runtime error
changed the tokenizer to AutoTokenizer
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
import os
|
3 |
import spaces
|
4 |
-
from transformers import AutoModelForCausalLM,
|
5 |
from threading import Thread
|
6 |
|
7 |
|
@@ -27,7 +27,7 @@ PLACEHOLDER = """
|
|
27 |
|
28 |
|
29 |
# Load the tokenizer and model
|
30 |
-
tokenizer =
|
31 |
model = AutoModelForCausalLM.from_pretrained("google/codegemma-7b-it", device_map="auto")
|
32 |
|
33 |
|
|
|
1 |
import gradio as gr
|
2 |
import os
|
3 |
import spaces
|
4 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
|
5 |
from threading import Thread
|
6 |
|
7 |
|
|
|
27 |
|
28 |
|
29 |
# Load the tokenizer and model
|
30 |
+
tokenizer = AutoTokenizer.from_pretrained("google/codegemma-7b-it")
|
31 |
model = AutoModelForCausalLM.from_pretrained("google/codegemma-7b-it", device_map="auto")
|
32 |
|
33 |
|