import gradio as gr from datasets import load_dataset, load_from_disk, Dataset from transformers import AutoTokenizer, AutoModel import torch import pandas as pd model_ckpt = "nomic-ai/nomic-embed-text-v1.5" tokenizer = AutoTokenizer.from_pretrained(model_ckpt) model = AutoModel.from_pretrained(model_ckpt, trust_remote_code=True) device = torch.device("cpu") model.to(device) def greet(name): return "Hello 3333" + name + "!!" iface = gr.Interface(fn=greet, inputs="text", outputs="text") iface.launch()