Bronco92's picture
Update app.py
58b05af
raw
history blame
378 Bytes
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()