Spaces:
Sleeping
Sleeping
Commit ·
9c9d121
1
Parent(s): 92fb67a
zerogpu
Browse files
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
import torch
|
| 3 |
|
| 4 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
@@ -11,6 +12,7 @@ print("Downloading model")
|
|
| 11 |
tokenizer = AutoTokenizer.from_pretrained(model_id, gguf_file=filename)
|
| 12 |
model = AutoModelForCausalLM.from_pretrained(model_id, gguf_file=filename, torch_dtype=torch_dtype)
|
| 13 |
|
|
|
|
| 14 |
def greet(name):
|
| 15 |
return "Hello " + name + "!!"
|
| 16 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import spaces
|
| 3 |
import torch
|
| 4 |
|
| 5 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
|
|
| 12 |
tokenizer = AutoTokenizer.from_pretrained(model_id, gguf_file=filename)
|
| 13 |
model = AutoModelForCausalLM.from_pretrained(model_id, gguf_file=filename, torch_dtype=torch_dtype)
|
| 14 |
|
| 15 |
+
@spaces.GPU
|
| 16 |
def greet(name):
|
| 17 |
return "Hello " + name + "!!"
|
| 18 |
|