Spaces:
Sleeping
Sleeping
hsuvaskakoty
commited on
Commit
•
d2324b7
1
Parent(s):
4165ebd
Upload app.py
Browse files
app.py
CHANGED
@@ -20,6 +20,25 @@ def process_url(url, model_key):
|
|
20 |
return processed_text, highest_prob_label, highest_prob, progress_bars #,highlighted_text
|
21 |
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
url_input = gr.Textbox(label="URL")
|
24 |
model_name_input = gr.Dropdown(label="Model Name", choices=list(model_dict.keys()), value=list(model_dict.keys())[0])
|
25 |
outputs = [
|
@@ -30,5 +49,5 @@ outputs = [
|
|
30 |
#gr.HTML(label="Processed Text")
|
31 |
]
|
32 |
|
33 |
-
demo = gr.Interface(fn=process_url, inputs=[url_input, model_name_input], outputs=outputs)
|
34 |
demo.launch() #share=True)
|
|
|
20 |
return processed_text, highest_prob_label, highest_prob, progress_bars #,highlighted_text
|
21 |
|
22 |
|
23 |
+
title = 'Wikipedia Deletion Discussion Classifier Demo'
|
24 |
+
desc = """ This demo is about classifying deletion discussions from Wikipedia about Wikipedia articles. Wikipedia community engages in discussions related to an article’s quality, and map potential issues to existing templates, or Wikipedia policies, which cover diverse areas, from low notability of sources to content implausibility or vandalism.
|
25 |
+
|
26 |
+
To this end, we design a multiclass classifier to predict the outcome of a deletion discussion, without the need for human intervention. The classifier is trained on a dataset of deletion discussions from Wikipedia, and it predicts one of the following labels: delete, keep, merge, no consensus, speedy keep, speedy delete, redirect, or withdrawn. Each of these labels corresponds to a specific outcome of the deletion discussion as described below.
|
27 |
+
|
28 |
+
- **keep**: The article should be kept as it is.
|
29 |
+
- **delete**: The article should be deleted.
|
30 |
+
- **merge**: The article should be merged with another article. Articles that are short and unlikely to be expanded could be merged into larger articles or lists.
|
31 |
+
- **redirect**: The article should be redirected to another existing article that is a better target for the content.
|
32 |
+
- **withdraw**: The nominator withdraws their nomination for deletion, often due to improvements made to the article during the discussion.
|
33 |
+
- **no consensus**: When there is no clear agreement on the deletion discussion.
|
34 |
+
- **speedy keep**: The article should be kept and there are reasons to bypass deletion discussions to keep the article immediately.
|
35 |
+
- **speedy delete**: The article should be deleted and there are reasons to bypass deletion discussions to delete the article immediately.
|
36 |
+
|
37 |
+
The input to the classifier is a URL of a Wikipedia deletion discussion page, and the output is the predicted label of the discussion, along with the probability of the predicted label, and the probabilities of all the labels.
|
38 |
+
The input to the classifier is a URL of a Wikipedia deletion discussion page, and the output is the predicted label of the discussion, along with the probability of the predicted label, and the probabilities of all the labels.
|
39 |
+
"""
|
40 |
+
|
41 |
+
|
42 |
url_input = gr.Textbox(label="URL")
|
43 |
model_name_input = gr.Dropdown(label="Model Name", choices=list(model_dict.keys()), value=list(model_dict.keys())[0])
|
44 |
outputs = [
|
|
|
49 |
#gr.HTML(label="Processed Text")
|
50 |
]
|
51 |
|
52 |
+
demo = gr.Interface(fn=process_url, inputs=[url_input, model_name_input], outputs=outputs, title=title, description=desc)
|
53 |
demo.launch() #share=True)
|