import gradio as gr from transformers import pipeline # Load your model from Hugging Face Hub pipe = pipeline("text-classification", model="rbarac/open-rotor-copilot") # Or your exact model/task def analyze_text_input(input_str): # Input_str could be: "gyro_std=123.4, vbat_drop=0.91, ..." etc. result = pipe(input_str) return result[0]["reason"] iface = gr.Interface( fn=analyze_text_input, inputs=gr.Textbox(label="Feature string", placeholder="gyro_std=123.4, vbat_drop=0.91, ..."), outputs=gr.Textbox(label="Detected Issue / Reason"), title="Open Rotor Copilot (Single Example)", description="Paste a windowed feature string and get detected issue & explanation." ) if __name__ == "__main__": iface.launch()