File size: 286 Bytes
1d9afae
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
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