|
import gradio as gr |
|
from fake_job_detector.models import DistilBERTBaseModel |
|
|
|
|
|
def process_input(title, description): |
|
|
|
safetensors_path = "base_unfrozen_5epoch" |
|
|
|
|
|
model = DistilBERTBaseModel(safetensors_path) |
|
|
|
result = model(title, description) |
|
|
|
return result |
|
|
|
def main(): |
|
|
|
interface = gr.Interface( |
|
fn=process_input, |
|
inputs=[gr.Textbox(label="Title"), gr.Textbox(label="Description", lines=4)], |
|
outputs=gr.Textbox(label="Output"), |
|
title="Simple Gradio App", |
|
description="This is a simple Gradio app that concatenates title and description." |
|
) |
|
|
|
|
|
interface.launch() |
|
|
|
if __name__ == "__main__": |
|
main() |
|
|