File size: 572 Bytes
5f82275 34f61d3 f17fe17 34f61d3 f17fe17 34f61d3 f17fe17 34f61d3 f17fe17 34f61d3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import gradio as gr
# Assuming this is the correct path to your model and it returns a usable object.
model = gr.Interface.load("models/NousResearch/Yarn-Mistral-7b-64k")
# Define a function that uses your model for inference, ensuring that the 'model' can predict.
def predict(input):
# Example prediction code. Replace with actual prediction logic.
return model(input)
# Create a Gradio interface
interface = gr.Interface(fn=predict, inputs="text", outputs="text")
# Launch the interface with share=True to create a public link.
interface.launch(share=True)
|