Python-Huggingface / test /test-api-space.py
morenomp's picture
cambio de nombre
5bb0f9e verified
raw
history blame contribute delete
365 Bytes
# Una vez hemos hecho el deploy en Hugging Face, podemos probar la API de Gradio
# usando el cliente de Gradio (https://github.com/gradio-app/gradio-client)
from gradio_client import Client
client = Client("morenomp/Python-Huggingface")
result = client.predict(
query="Where is the hospital located!!",
top_k=5,
umbral=0.55,
api_name="/ask"
)
print(result[0])