Mobile UI fix

This commit is contained in:
2026-01-07 10:57:57 +01:00
parent 86c20628c8
commit 6f0977be50
3 changed files with 6 additions and 16 deletions

View File

@@ -268,7 +268,7 @@
curl -X POST http://localhost:8000/api/predict \ curl -X POST http://localhost:8000/api/predict \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{ -d '{
"prompt": "Once upon a time", "prompt": "Kiedyś tak było",
"n": 4, "n": 4,
"temperature": 1.2, "temperature": 1.2,
"length": 20 "length": 20
@@ -280,7 +280,7 @@ curl -X POST http://localhost:8000/api/predict \
<div class="code-block"> <div class="code-block">
<pre> <pre>
{ {
"prediction": "in a kingdom far away there lived a brave knight who sought adventure..." "prediction": "przezroczyste, że prawie ich dostrzec nie mógł. Słysząc bowiem tyle o jej egzystencji. Zaiste z pogardą arcykapłańskich święceń i źle traktujesz sługi boże."
}</pre }</pre
> >
</div> </div>
@@ -294,7 +294,7 @@ const response = await fetch('/api/predict', {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
}, },
body: JSON.stringify({ body: JSON.stringify({
prompt: 'The old wizard', prompt: 'Kiedyś tak było',
n: 3, n: 3,
temperature: 0.8, temperature: 0.8,
length: 15 length: 15
@@ -313,7 +313,7 @@ import requests
response = requests.post('http://localhost:8000/api/predict', response = requests.post('http://localhost:8000/api/predict',
json={ json={
'prompt': 'In the beginning', 'prompt': 'Kiedyś tak było',
'n': 4, 'n': 4,
'temperature': 1.0, 'temperature': 1.0,
'length': 25 'length': 25
@@ -385,15 +385,6 @@ print(result['prediction'])</pre
</li> </li>
</ul> </ul>
</div> </div>
<div class="section">
<h2>Rate Limits</h2>
<p>
Currently, there are no rate limits imposed on the API. For
production use, consider implementing appropriate rate
limiting.
</p>
</div>
</div> </div>
</body> </body>
</html> </html>

View File

@@ -158,9 +158,9 @@ document.addEventListener("DOMContentLoaded", () => {
closeSidebarOnMobile(); closeSidebarOnMobile();
}); });
// Sync scroll - FIX: Use transform instead of scrollTop // Sync scroll
editor.addEventListener("scroll", () => { editor.addEventListener("scroll", () => {
suggestionOverlay.style.transform = `translateY(-${editor.scrollTop}px)`; suggestionOverlay.scrollTop = editor.scrollTop;
}); });
// Initialize UI badges // Initialize UI badges

View File

@@ -414,5 +414,4 @@ label {
pointer-events: none; pointer-events: none;
opacity: 0.5; opacity: 0.5;
overflow: hidden; overflow: hidden;
transition: transform 0.05s linear;
} }