File size: 378 Bytes
14f4c95
942bf87
 
 
 
 
14f4c95
 
 
 
 
942bf87
14f4c95
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import gradio as gr
import joblib

# Load your trained model
model = joblib.load("SVM.joblib")  # Ensure this file is in the correct directory

def predict(sequence):
    prediction = model.predict([len(sequence)])  # Adjust based on your features
    return "AMP" if prediction[0] else "Non-AMP"

iface = gr.Interface(fn=predict, inputs="text", outputs="text")

iface.launch()