Download app.py from elchemist/dolly: direct link, hf CLI and curl.
- Browser
- Download file 354 Bytes
-
https://huggingface.co/spaces/elchemist/dolly/resolve/main/app.py
- Command line
-
hf download hf://spaces/elchemist/dolly/app.py
-
curl -L -o app.py https://huggingface.co/spaces/elchemist/dolly/resolve/main/app.py
354 Bytes
| import gradio as gr | |
| import torch | |
| from transformers import pipeline | |
| ans = pipeline(model="databricks/dolly-v2-3b", torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto") | |
| def answer(query): | |
| out=ans(query) | |
| return out | |
| Demo = gr.Interface(fn=answer,inputs='text',outputs='text',examples=[['What is the capital of India ?']]) | |
| Demo.launch() | |