Spaces:
Runtime error
Runtime error
Download app.py from Sweety0403/deployment-model-ui: direct link, hf CLI and curl.
- Browser
- Download file 481 Bytes
-
https://huggingface.co/spaces/Sweety0403/deployment-model-ui/resolve/main/app.py
- Command line
-
hf download hf://spaces/Sweety0403/deployment-model-ui/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Sweety0403/deployment-model-ui/resolve/main/app.py
481 Bytes
| import gradio as gr | |
| from transformers import pipeline | |
| model = pipeline("text2text-generation", model="Sweety0403/deployment-model") | |
| def generate_output(prompt): | |
| result = model(prompt) | |
| return result[0]["generated_text"] | |
| demo = gr.Interface( | |
| fn=generate_output, | |
| inputs=gr.Textbox(lines=2, placeholder="Enter your input here..."), | |
| outputs="text", | |
| title="Deployment Model", | |
| description="Gradio interface for Sweety0403/deployment-model" | |
| ) | |
| demo.launch() | |