Spaces:
Runtime error
Runtime error
Download app.py from krish381/testingdemo: direct link, hf CLI and curl.
- Browser
- Download file 383 Bytes
-
https://huggingface.co/spaces/krish381/testingdemo/resolve/main/app.py
- Command line
-
hf download hf://spaces/krish381/testingdemo/app.py
-
curl -L -o app.py https://huggingface.co/spaces/krish381/testingdemo/resolve/main/app.py
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) | |