jpodolak
commited on
Commit
·
cb9b901
1
Parent(s):
5ae04c2
Download bloom
Browse files
app.py
CHANGED
@@ -1,4 +1,12 @@
|
|
1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
def greet(name):
|
4 |
return "Hello " + name + "!!"
|
|
|
1 |
import gradio as gr
|
2 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
3 |
+
|
4 |
+
tokenizer = AutoTokenizer.from_pretrained("bigscience/bloom")
|
5 |
+
model = AutoModelForCausalLM.from_pretrained(
|
6 |
+
"bigscience/bloom",
|
7 |
+
device_map="auto",
|
8 |
+
torch_dtype="auto",
|
9 |
+
)
|
10 |
|
11 |
def greet(name):
|
12 |
return "Hello " + name + "!!"
|