ciyidogan commited on
Commit
ab83111
·
verified ·
1 Parent(s): f3f754f

Update fine_tune_inference_test_mistral.py

Browse files
fine_tune_inference_test_mistral.py CHANGED
@@ -45,19 +45,20 @@ def root():
45
  <html>
46
  <body>
47
  <h2>Mistral 7B Instruct Chat</h2>
48
- <textarea id=\"input\" rows=\"4\" cols=\"60\" placeholder=\"Write your instruction...\"></textarea><br>
49
- <button onclick=\"send()\">Gönder</button>
50
- <pre id=\"output\"></pre>
 
51
  <script>
52
  async function send() {
53
- const input = document.getElementById(\"input\").value;
54
  const res = await fetch('/chat', {
55
  method: 'POST',
56
  headers: { 'Content-Type': 'application/json' },
57
  body: JSON.stringify({ user_input: input })
58
  });
59
  const data = await res.json();
60
- document.getElementById('output').innerText = data.answer || data.error || 'Hata oluştu.';
61
  }
62
  </script>
63
  </body>
 
45
  <html>
46
  <body>
47
  <h2>Mistral 7B Instruct Chat</h2>
48
+ <textarea id="input" rows="4" cols="60" placeholder="Write your instruction..."></textarea><br>
49
+ <button onclick="send()">Gönder</button><br><br>
50
+ <label>Model Cevabı:</label><br>
51
+ <textarea id="output" rows="10" cols="80" readonly style="white-space: pre-wrap;"></textarea>
52
  <script>
53
  async function send() {
54
+ const input = document.getElementById("input").value;
55
  const res = await fetch('/chat', {
56
  method: 'POST',
57
  headers: { 'Content-Type': 'application/json' },
58
  body: JSON.stringify({ user_input: input })
59
  });
60
  const data = await res.json();
61
+ document.getElementById('output').value = data.answer || data.response || data.error || 'Hata oluştu.';
62
  }
63
  </script>
64
  </body>