Spaces:
Sleeping
Sleeping
File size: 661 Bytes
7dfd5db 9c9d121 32cf640 7dfd5db 2144fdb 3b930a2 771a832 2144fdb f37ed6f e62c0db df6ba08 3b930a2 9c9d121 7dfd5db df6ba08 7dfd5db |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
import gradio as gr
import spaces
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
model_id = "AverageBusinessUser/aidapal"
filename = "aidapal-8k.Q4_K_M.gguf"
print("Downloading model")
tokenizer = AutoTokenizer.from_pretrained(model_id, gguf_file=filename)
model = AutoModelForCausalLM.from_pretrained(
model_id,
gguf_file=filename,
device_map="auto"
)
# Then create the pipeline with the model and tokenizer
#pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer)
@spaces.GPU
def greet(name):
return "what"
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
demo.launch() |