khaliqabdull commited on
Commit
983c2e5
·
verified ·
1 Parent(s): 6beede0

Upload 3 files

Browse files
Files changed (3) hide show
  1. README.md +13 -7
  2. app (1).py +22 -0
  3. requirements.txt +4 -0
README.md CHANGED
@@ -1,12 +1,18 @@
1
  ---
2
- title: Humanizer3.0
3
- emoji: 🏆
4
- colorFrom: red
5
- colorTo: blue
6
  sdk: gradio
7
- sdk_version: 5.31.0
8
  app_file: app.py
9
- pinned: false
 
 
 
 
10
  ---
11
 
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
1
  ---
2
+ title: AI Humanizer
3
+ emoji: 🧠
4
+ colorFrom: blue
5
+ colorTo: green
6
  sdk: gradio
7
+ sdk_version: 4.16.0
8
  app_file: app.py
9
+ tags:
10
+ - text2text-generation
11
+ - gradio
12
+ - huggingface
13
+ - ai-humanizer
14
  ---
15
 
16
+ # 🤖 AI Humanizer
17
+
18
+ Make robotic or AI-generated text sound more natural, friendly, and human. This app uses `MBZUAI/LaMini-Flan-T5-783M` via Hugging Face Inference API and Gradio.
app (1).py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+
4
+ # Load the model
5
+ generator = pipeline("text2text-generation", model="MBZUAI/LaMini-Flan-T5-783M")
6
+
7
+ # Define the function
8
+ def humanize_text(input_text):
9
+ if not input_text.strip():
10
+ return "Please enter some text to humanize."
11
+ prompt = "Paraphrase this more naturally: " + input_text
12
+ result = generator(prompt, max_length=256, do_sample=True)
13
+ return result[0]["generated_text"]
14
+
15
+ # Interface to expose /run/predict
16
+ gr.Interface(
17
+ fn=humanize_text,
18
+ inputs=gr.Textbox(lines=6, label="Input Text"),
19
+ outputs=gr.Textbox(label="Humanized Text"),
20
+ title="🤖 AI Humanizer",
21
+ description="Enter AI-generated or robotic text and get a more natural, human-sounding version."
22
+ ).launch()
requirements.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ gradio>=4.16.0
2
+ transformers
3
+ torch
4
+ sentencepiece