File size: 378 Bytes
55f2a3d 245c501 58b05af 245c501 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import gradio as gr
def predict(input_text):
# Limit the input length
truncated_input = input_text[:512]
# Load the interface and make a prediction
iface = gr.load("models/DATEXIS/CORe-clinical-diagnosis-prediction")
prediction = iface(truncated_input)
return prediction
iface = gr.Interface(fn=predict, inputs='text', outputs='text')
iface.launch()
|