humanize-e / app_gradio.py
world44's picture
Initial demo files for humanize-e
6595ce6 verified
Raw History Blame Contribute Delete
918 Bytes
import gradio as gr
from model import HumanizeModel
model = HumanizeModel()
def humanize_text(text):
if not text.strip():
return "Please enter some text."
result = model.humanize(text)
return result
demo = gr.Interface(
fn=humanize_text,
inputs=gr.Textbox(lines=8, placeholder="Paste AI-generated text here...", label="Input"),
outputs=gr.Textbox(lines=8, label="Humanized Output"),
title="humanize-e",
description="Rewrites AI-generated text to sound more natural and human-written. Developed by Mike Elistra.",
examples=[
"In order to provide you with a comprehensive solution, it is important to note that we have conducted extensive research.",
"As an AI language model, I must inform you that the following information is based on publicly available data."
]
)
if __name__ == "__main__":
demo.launch(server_name="0.0.0.0", server_port=7860)