Spaces:
Runtime error
Runtime error
File size: 405 Bytes
3bdb9f0 2d71f41 abd754d 3bdb9f0 9da3581 6f54cf8 dfc3b85 d942439 be6172f d942439 4d5ed6a d942439 3bdb9f0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import gradio
from os import system
system("pip3 install torch")
system("pip3 install transformers")
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrpained("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() |