Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
from fastapi import FastAPI, Request, WebSocket
|
| 2 |
-
from fastapi.templating import Jinja2Templates
|
| 3 |
from fastapi.responses import HTMLResponse
|
| 4 |
import subprocess
|
| 5 |
import asyncio
|
|
@@ -37,7 +36,7 @@ class EngineChess:
|
|
| 37 |
self.thread.start()
|
| 38 |
|
| 39 |
self._has_quit_command_been_sent = False
|
| 40 |
-
self._debug_view =
|
| 41 |
|
| 42 |
def _put(self, command):
|
| 43 |
if not self._stockfish.stdin:
|
|
@@ -75,7 +74,6 @@ class EngineChess:
|
|
| 75 |
return self._read_line()
|
| 76 |
|
| 77 |
app = FastAPI()
|
| 78 |
-
templates = Jinja2Templates(directory="templates")
|
| 79 |
|
| 80 |
# WebSocket endpoints
|
| 81 |
@app.websocket("/stockfish-{version}")
|
|
|
|
| 1 |
from fastapi import FastAPI, Request, WebSocket
|
|
|
|
| 2 |
from fastapi.responses import HTMLResponse
|
| 3 |
import subprocess
|
| 4 |
import asyncio
|
|
|
|
| 36 |
self.thread.start()
|
| 37 |
|
| 38 |
self._has_quit_command_been_sent = False
|
| 39 |
+
self._debug_view = True
|
| 40 |
|
| 41 |
def _put(self, command):
|
| 42 |
if not self._stockfish.stdin:
|
|
|
|
| 74 |
return self._read_line()
|
| 75 |
|
| 76 |
app = FastAPI()
|
|
|
|
| 77 |
|
| 78 |
# WebSocket endpoints
|
| 79 |
@app.websocket("/stockfish-{version}")
|