Download app.py from surgery-racoon/mostrol: direct link, hf CLI and curl.
- Browser
- Download file 366 Bytes
-
https://huggingface.co/surgery-racoon/mostrol/resolve/main/app.py
- Command line
-
hf download hf://surgery-racoon/mostrol/app.py
-
curl -L -o app.py https://huggingface.co/surgery-racoon/mostrol/resolve/main/app.py
366 Bytes
| import gradio as gr | |
| from dotenv import load_dotenv | |
| import os | |
| load_dotenv() | |
| # With pipeline, just specify the task and the model id from the Hub. | |
| from transformers import pipeline | |
| pipe = pipeline("text-generation", model="distilgpt2") | |
| def greet(name): | |
| return "Hello " + name + "!!" | |
| iface = gr.Interface(fn=greet, inputs="text", outputs="text") | |
| iface.launch() |