Spaces:
Sleeping
Sleeping
File size: 294 Bytes
5590815 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #!/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()
|