File size: 1,858 Bytes
a0804d5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE html>
<html lang="zh-Hant">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>預測詐騙訊息</title>
    <link rel="stylesheet" href="/static/style.css">
</head>
<body>
    <h1>檢查可疑訊息</h1>

    <div class="main-container"> 
        <!-- 使用者輸入 -->
        <section id="input_area" class="panel">
            <textarea id="predict_info" placeholder="請輸入內容 (最多5000字)" maxlength="5000"></textarea>
            <div class="button-group">
                <button id="detect_button" type="submit">檢測!</button>
                <button id="clear_button" type="reset">清除</button>
            </div>
        </section>

        <!-- 模型預測結果 + 使用者回饋(已合併) -->
        <section id="output_area" class="panel"> 
            <h2>檢測結果</h2>
            <p><strong>是否為詐騙訊息:</strong> <span id="is_scam">待檢測</span></p>
            <p><strong>模型預測可疑度:</strong> <span id="confidence_score">待檢測</span></p>
            <p><strong>可疑詞句分析:</strong></p>
            <div id="suspicious_phrases">
                <p>請輸入訊息並點擊「檢測!」按鈕。</p>
            </div>

            <!-- ✅ 使用者回饋區塊 -->
            <section id="feedback_area" style="display: none;">
                <p><strong>這筆預測結果正確嗎?</strong></p>
                <div class="button-group">
                    <button id="feedback_correct">✅ 正確</button>
                    <button id="feedback_wrong">❌ 錯誤</button>
                </div>
                <p id="feedback_status" style="color: green;"></p>
            </section>
        </section>
    </div>

    <script src="/static/script.js"></script>
</body>
</html>