Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1003,9 +1003,10 @@ custom_css = """
|
|
| 1003 |
}
|
| 1004 |
"""
|
| 1005 |
|
| 1006 |
-
# Create Gradio Interface
|
| 1007 |
-
|
| 1008 |
|
|
|
|
| 1009 |
gr.HTML("""
|
| 1010 |
<div style='background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 1011 |
padding: 40px 20px;
|
|
@@ -1032,21 +1033,18 @@ with gr.Blocks(css=custom_css) as demo:
|
|
| 1032 |
input_text = gr.Textbox(
|
| 1033 |
label="📝 AI-Generated Text",
|
| 1034 |
lines=10,
|
| 1035 |
-
placeholder="Paste your AI-generated text here..."
|
| 1036 |
-
info="Enter the text you want to humanize"
|
| 1037 |
)
|
| 1038 |
|
| 1039 |
-
with gr.Row(
|
| 1040 |
-
clear_btn = gr.Button("🗑️ Clear"
|
| 1041 |
-
submit_btn = gr.Button("✨ Humanize Text"
|
| 1042 |
|
| 1043 |
output_text = gr.Textbox(
|
| 1044 |
label="✨ Humanized Academic Text",
|
| 1045 |
-
lines=12
|
| 1046 |
-
show_copy_button=True
|
| 1047 |
)
|
| 1048 |
|
| 1049 |
-
# Button actions
|
| 1050 |
submit_btn.click(
|
| 1051 |
fn=convert_text_gradio,
|
| 1052 |
inputs=input_text,
|
|
@@ -1063,6 +1061,5 @@ with gr.Blocks(css=custom_css) as demo:
|
|
| 1063 |
if __name__ == "__main__":
|
| 1064 |
demo.launch(
|
| 1065 |
server_name="0.0.0.0",
|
| 1066 |
-
server_port=7860
|
| 1067 |
-
share=False
|
| 1068 |
)
|
|
|
|
| 1003 |
}
|
| 1004 |
"""
|
| 1005 |
|
| 1006 |
+
# Create Gradio Interface (Compatible with all Gradio versions)
|
| 1007 |
+
demo = gr.Blocks()
|
| 1008 |
|
| 1009 |
+
with demo:
|
| 1010 |
gr.HTML("""
|
| 1011 |
<div style='background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 1012 |
padding: 40px 20px;
|
|
|
|
| 1033 |
input_text = gr.Textbox(
|
| 1034 |
label="📝 AI-Generated Text",
|
| 1035 |
lines=10,
|
| 1036 |
+
placeholder="Paste your AI-generated text here..."
|
|
|
|
| 1037 |
)
|
| 1038 |
|
| 1039 |
+
with gr.Row():
|
| 1040 |
+
clear_btn = gr.Button("🗑️ Clear")
|
| 1041 |
+
submit_btn = gr.Button("✨ Humanize Text")
|
| 1042 |
|
| 1043 |
output_text = gr.Textbox(
|
| 1044 |
label="✨ Humanized Academic Text",
|
| 1045 |
+
lines=12
|
|
|
|
| 1046 |
)
|
| 1047 |
|
|
|
|
| 1048 |
submit_btn.click(
|
| 1049 |
fn=convert_text_gradio,
|
| 1050 |
inputs=input_text,
|
|
|
|
| 1061 |
if __name__ == "__main__":
|
| 1062 |
demo.launch(
|
| 1063 |
server_name="0.0.0.0",
|
| 1064 |
+
server_port=7860
|
|
|
|
| 1065 |
)
|