Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,5 +16,13 @@ def parse_text(new_text):
|
|
16 |
confidence_score = probabilities[0, 1]
|
17 |
return 'ืชื "ื' if prediction[0] == 1 else 'ืืืจ', confidence_score
|
18 |
|
19 |
-
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
confidence_score = probabilities[0, 1]
|
17 |
return 'ืชื "ื' if prediction[0] == 1 else 'ืืืจ', confidence_score
|
18 |
|
19 |
+
# Define the style using Gradio's custom CSS feature
|
20 |
+
style = gr.Interface(fn=parse_text, inputs="text", outputs=["text", "number"], title="ืืืืื ืคืกืืงื ืืชื \"ื ืืืืฆืขืืช AI",
|
21 |
+
description="ืืงืืืื ืืช ืืืงืกื ืฉืชืจืฆื, ืืืื ืืื ืืื ืืื ืืืคืืข ืืชื \"ื ืืืืฆืขืืช ืงืกื ืืืื ื ืืืืืืืชืืช",
|
22 |
+
theme="compact", allow_flagging="auto",
|
23 |
+
css=""".input-box {width: 90%; padding: 10px; margin-bottom: 15px; border: none; border-radius: 8px; background-color: #f2f2f2; color: #333; resize: none;}
|
24 |
+
.output-box {width: 90%; padding: 10px; border: none; border-radius: 8px; background-color: #f2f2f2; color: #333;}
|
25 |
+
.btn {width: 90%; padding: 10px; border: none; border-radius: 8px; background-color: #5d8d77; color: white; cursor: pointer; transition: background-color 0.3s ease-in-out;}
|
26 |
+
.btn:hover {background-color: #507b66;}
|
27 |
+
""")
|
28 |
+
style.launch()
|