File size: 943 Bytes
6b5142c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import gradio as gr
from model import HumanizeModel

model = HumanizeModel()

def humanize_text(text):
    if not text.strip():
        return "Please enter some text."
    return model.humanize(text)

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. Adapter loads from HUMANIZE_ADAPTER env var.",
    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)