TestSpaceGPT / app.py
aisah1's picture
Update app.py
06ffcdd verified
raw
history blame
409 Bytes
import gradio
from os import system
system("pip3 install torch")
system("pip3 install transformers")
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("openai-community/openai-gpt")
def work(inp_text):
out = "hello"
out = tokenizer.encode(hello)
return str(out)
demo = gradio.Interface(
fn=work,
inputs=["text"],
outputs=["text"],
)
demo.launch()