SarahMarzouq commited on
Commit
0efdfae
·
verified ·
1 Parent(s): af16496

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -43
app.py DELETED
@@ -1,43 +0,0 @@
1
- #This function will take and input then return the label and the score of that sentence.
2
- def classification_fun(news_article):
3
- results = Clasification(news_article)
4
- return results[0]['label'], results[0]['score']
5
-
6
- #CSS styling for the Gradio interface
7
- custom_css = """
8
- textarea, .gradio-output {
9
- direction: rtl;
10
- background-color: black;
11
- color: white;
12
- border: 2px solid #800020;
13
- border-radius: 5px;
14
- padding: 10px;
15
- }
16
-
17
- label {
18
- font-size: 18px;
19
- font-weight: bold;
20
- text-align: center;
21
- background-color: #800020;
22
- color: white;
23
- box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
24
- padding: 5px;
25
- display: block;
26
- margin: 10px 0;
27
- }
28
-
29
- .gradio-container {
30
- background-color: black;
31
- padding: 20px;
32
- box-sizing: border-box;
33
- }
34
- """
35
-
36
- my_model = gr.Interface(
37
- fn=classification_fun,
38
- inputs=gr.Textbox(label="News Articles", lines=10, placeholder="Enter your Article"),
39
- outputs=[gr.Textbox(label="Label of the Article"), gr.Number(label="Confidence Score")],
40
- css=custom_css
41
- )
42
-
43
- my_model.launch()