Update app.py
Browse files
app.py
CHANGED
@@ -27,10 +27,14 @@ def generate_wordcloud(text):
|
|
27 |
# inputs="text",
|
28 |
# outputs="image")
|
29 |
|
|
|
|
|
30 |
interface = gr.Interface(
|
31 |
fn=generate_wordcloud,
|
32 |
-
inputs=gr.
|
33 |
-
outputs="
|
|
|
|
|
34 |
)
|
35 |
|
36 |
interface.launch()
|
|
|
27 |
# inputs="text",
|
28 |
# outputs="image")
|
29 |
|
30 |
+
|
31 |
+
# Create a Gradio interface
|
32 |
interface = gr.Interface(
|
33 |
fn=generate_wordcloud,
|
34 |
+
inputs=gr.Textbox(placeholder="Paste your text here", label="Your Text"), # Use gr.Textbox directly
|
35 |
+
outputs=gr.Image(type="pil"), # Use gr.Image for more explicit output definition
|
36 |
+
title="Word Cloud Generator",
|
37 |
+
description="Enter your text in the textbox and generate a word cloud."
|
38 |
)
|
39 |
|
40 |
interface.launch()
|