Spaces:
Sleeping
Sleeping
Download app.py from tmpai/Hiroyuki-SLM: direct link, hf CLI and curl.
- Browser
- Download file 294 Bytes
-
https://huggingface.co/spaces/tmpai/Hiroyuki-SLM/resolve/main/app.py
- Command line
-
hf download hf://spaces/tmpai/Hiroyuki-SLM/app.py
-
curl -L -o app.py https://huggingface.co/spaces/tmpai/Hiroyuki-SLM/resolve/main/app.py
294 Bytes
| #!/usr/bin/env python3 | |
| """ | |
| Hiroyuki-SLM API with Hugging Face Spaces | |
| """ | |
| import asyncio | |
| import gradio as gr | |
| from slm_model import HiroyukiSLM | |
| slm = HiroyukiSLM() | |
| def respond(text): | |
| return asyncio.run(slm.generate(text)) | |
| gr.Interface(fn=respond, inputs="text", outputs="text").launch() | |