import gradio from os import system system("pip3 install torch") system("pip3 install transformers") from transformers import AutoTokenizer tokenizer = AutoTokenizer.from_preteained("openai-community/openai-gpt") def work(inp_text): out = "hello" out = tokenizer.encode(hello) return out demo = gradio.Interface( fn=work, inputs=["text"], outputs=["text"], ) demo.launch()