Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -225,8 +225,8 @@ def extract_problem_domains(df,
|
|
225 |
text_column='Problem_Description',
|
226 |
cluster_range=(10, 50),
|
227 |
top_words=17,
|
228 |
-
method='sentence_transformers'
|
229 |
-
|
230 |
):
|
231 |
|
232 |
|
@@ -381,22 +381,6 @@ import random
|
|
381 |
a_random_object = random.choice(["⇒", "↣", "↠", "→"])
|
382 |
|
383 |
|
384 |
-
|
385 |
-
|
386 |
-
# Define custom CSS for the console window
|
387 |
-
console_css = """
|
388 |
-
<style>
|
389 |
-
#console-messages label {
|
390 |
-
color: white !important;
|
391 |
-
}
|
392 |
-
#console-messages textarea {
|
393 |
-
background-color: black !important;
|
394 |
-
color: white !important;
|
395 |
-
}
|
396 |
-
</style>
|
397 |
-
"""
|
398 |
-
|
399 |
-
|
400 |
# Define the Gradio interface
|
401 |
interface = gr.Interface(
|
402 |
fn=process_excel, # The function to process the uploaded file
|
@@ -413,8 +397,7 @@ interface = gr.Interface(
|
|
413 |
# ],
|
414 |
# Use either below or above format
|
415 |
outputs=[
|
416 |
-
gr.
|
417 |
-
gr.Textbox(label="Console Messages", lines=10, interactive=False), # Console messages output
|
418 |
gr.File(label="Download the processed Excel File containing the ** Project Proposals ** for each Location~Problem paired combination") # File download output
|
419 |
],
|
420 |
|
|
|
225 |
text_column='Problem_Description',
|
226 |
cluster_range=(10, 50),
|
227 |
top_words=17,
|
228 |
+
# method='sentence_transformers'
|
229 |
+
method='tfidf_kmeans'
|
230 |
):
|
231 |
|
232 |
|
|
|
381 |
a_random_object = random.choice(["⇒", "↣", "↠", "→"])
|
382 |
|
383 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
384 |
# Define the Gradio interface
|
385 |
interface = gr.Interface(
|
386 |
fn=process_excel, # The function to process the uploaded file
|
|
|
397 |
# ],
|
398 |
# Use either below or above format
|
399 |
outputs=[
|
400 |
+
gr.Textbox(label="Console Messages", lines=3, interactive=False), # Console messages output
|
|
|
401 |
gr.File(label="Download the processed Excel File containing the ** Project Proposals ** for each Location~Problem paired combination") # File download output
|
402 |
],
|
403 |
|