File size: 481 Bytes
7c69e90 02d0b50 7c69e90 51427c6 7c69e90 f94547c 51427c6 7c69e90 51427c6 7c69e90 51427c6 7c69e90 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import gradio as gr
from huggingface_hub import InferenceClient
# Create an InferenceClient object (correct method)
client = InferenceClient(repo_id="willco-afk/languages")
# Define the prediction function
def predict(input_text):
# Use the 'predict' method to get the output
result = client.predict(input_text)
return result
# Define the Gradio interface
iface = gr.Interface(fn=predict, inputs="text", outputs="text")
# Launch the interface locally
iface.launch() |