Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -23,13 +23,13 @@ def process_text(text, operations):
|
|
23 |
result['Chunks'] = str(chunks)
|
24 |
return result
|
25 |
|
26 |
-
# Define Gradio interface
|
27 |
operations = ['normalize', 'tokenize', 'lemmatize', 'chunk']
|
28 |
iface = gr.Interface(
|
29 |
fn=process_text,
|
30 |
inputs=[
|
31 |
-
gr.
|
32 |
-
gr.
|
33 |
],
|
34 |
outputs="json",
|
35 |
title="Persian Text Processor with Hazm",
|
|
|
23 |
result['Chunks'] = str(chunks)
|
24 |
return result
|
25 |
|
26 |
+
# Define Gradio interface with updated syntax
|
27 |
operations = ['normalize', 'tokenize', 'lemmatize', 'chunk']
|
28 |
iface = gr.Interface(
|
29 |
fn=process_text,
|
30 |
inputs=[
|
31 |
+
gr.Textbox(lines=10, label="Input Text"),
|
32 |
+
gr.CheckboxGroup(operations, label="Operations")
|
33 |
],
|
34 |
outputs="json",
|
35 |
title="Persian Text Processor with Hazm",
|