Cnass commited on
Commit
04b78df
·
verified ·
1 Parent(s): fb1b465

Create test-ui/index.html

Browse files
Files changed (1) hide show
  1. test-ui/index.html +86 -0
test-ui/index.html ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="tr">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Hy-MT2 Translation API — Test Arayüzü</title>
7
+ <link rel="stylesheet" href="style.css" />
8
+ </head>
9
+ <body>
10
+ <div class="wrap">
11
+ <header>
12
+ <h1>Hy-MT2 Translation API <span class="badge">Test Arayüzü</span></h1>
13
+ <p class="sub">Tek istek ve toplu (batch) isteklerin yanıt sürelerini karşılaştırın.</p>
14
+ </header>
15
+
16
+ <section class="panel" id="config-panel">
17
+ <h2>Bağlantı Ayarları</h2>
18
+ <div class="grid">
19
+ <label>
20
+ API Base URL
21
+ <input type="text" id="apiBase" placeholder="https://your-space.hf.space" value="http://localhost:7860" />
22
+ </label>
23
+ <label>
24
+ API Key <span class="hint">(opsiyonel)</span>
25
+ <input type="text" id="apiKey" placeholder="X-API-Key" />
26
+ </label>
27
+ <label>
28
+ Hedef Dil
29
+ <select id="targetLang"></select>
30
+ </label>
31
+ <label>
32
+ Kaynak Dil <span class="hint">(opsiyonel)</span>
33
+ <select id="sourceLang">
34
+ <option value="">Otomatik algıla</option>
35
+ </select>
36
+ </label>
37
+ </div>
38
+ <div class="status-row">
39
+ <button id="checkHealth">Sağlık Kontrolü</button>
40
+ <span id="healthStatus" class="status-pill status-unknown">bilinmiyor</span>
41
+ </div>
42
+ </section>
43
+
44
+ <section class="panel">
45
+ <h2>Çevrilecek Metinler</h2>
46
+ <p class="hint">Her satır ayrı bir string olarak ele alınır (oyun string'lerini simüle eder).</p>
47
+ <textarea id="sourceText" rows="8">Hello!
48
+ Welcome!
49
+ Potion
50
+ Attack
51
+ You have obtained \V[1] gold.
52
+ Are you sure you want to quit the game?
53
+ The nearest inn is just north of here.
54
+ Press %1 to open your inventory.</textarea>
55
+ <div class="actions">
56
+ <button id="btnSingle">Tek İstek (ilk satır)</button>
57
+ <button id="btnBatch" class="primary">Toplu İstek (tüm satırlar)</button>
58
+ <button id="btnBenchmark" class="accent">Karşılaştır: Sıralı vs Toplu</button>
59
+ </div>
60
+ </section>
61
+
62
+ <section class="panel" id="results-panel" hidden>
63
+ <h2>Sonuçlar</h2>
64
+ <div class="stats" id="statsRow"></div>
65
+ <div class="table-wrap">
66
+ <table id="resultsTable">
67
+ <thead><tr><th>Orijinal</th><th>Çeviri</th><th>Süre</th></tr></thead>
68
+ <tbody></tbody>
69
+ </table>
70
+ </div>
71
+ </section>
72
+
73
+ <section class="panel" id="benchmark-panel" hidden>
74
+ <h2>Sıralı vs Toplu Karşılaştırma</h2>
75
+ <div class="bench-bars" id="benchBars"></div>
76
+ <p id="benchSummary" class="hint"></p>
77
+ </section>
78
+
79
+ <section class="panel" id="log-panel">
80
+ <h2>Log</h2>
81
+ <pre id="log"></pre>
82
+ </section>
83
+ </div>
84
+ <script src="script.js"></script>
85
+ </body>
86
+ </html>