TestSpaceGPT / app.py
aisah1's picture
Update app.py
6f54cf8 verified
raw
history blame
405 Bytes
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()