house_md_tg_bot / utils /get_answer_hf_api.py
ekaterinatao's picture
Create get_answer_hf_api.py
1d9afae verified
raw
history blame contribute delete
286 Bytes
from gradio_client import Client
from config_data.config import Config, load_config
config: Config = load_config()
client = Client(config.model.hf_client)
def get_answer(user_input):
answer = client.predict(
user_input,
api_name="/predict"
)
return answer