import gradio as gr from transformers import pipeline, AutoTokenizer, AutoModelForSequenceClassification model_name = "NimaKL/FireWatch_tiny_75k" tokenizer = AutoTokenizer.from_pretrained(model_name) model = AutoModelForSequenceClassification.from_pretrained(model_name) def predict(text): inputs = tokenizer(text, return_tensors="pt") outputs = model(**inputs) logits = outputs.logits label_id = logits.argmax(axis=1).item() return "Danger of fire hazard!" if label_id == 1 else "It is unlikely that a fire will start in this area." # Define a custom CSS style custom_style = """ body { background-color: #F262626; } """ # Define a function to generate HTML for embedding the Google Sheets document def get_sheet_html(): return f'' io = gr.Interface( fn=predict, inputs="text", outputs="text", title="FireWatch", description="