testingdemo / app.py
vamsi381
Updated code
6017397
raw
history blame contribute delete
383 Bytes
import gradio as gr
# Load model directly
# Use a pipeline as a high-level helper
from transformers import pipeline
def greet(name):
generator = pipeline("text-generation", model="surya-narayanan/high_school_mathematics-gpt2")
res= generator("what is similar traingles")
print(res)
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
demo.launch(share=True)