Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,6 @@ Run a rest API exposing the yolov5s object detection model
|
|
4 |
|
5 |
import io
|
6 |
import torch
|
7 |
-
import flask
|
8 |
from flask import Flask, request
|
9 |
from PIL import Image
|
10 |
from waitress import serve
|
@@ -58,8 +57,7 @@ app = Flask(__name__)
|
|
58 |
@app.route('/')
|
59 |
def index():
|
60 |
return '<iframe frameBorder="0" height="100%" src="{}/?__dark-theme={}" width="100%"></iframe>'.format(
|
61 |
-
|
62 |
-
flask.request.args.get('__dark-theme', 'false'))
|
63 |
|
64 |
|
65 |
if __name__ == '__main__':
|
|
|
4 |
|
5 |
import io
|
6 |
import torch
|
|
|
7 |
from flask import Flask, request
|
8 |
from PIL import Image
|
9 |
from waitress import serve
|
|
|
57 |
@app.route('/')
|
58 |
def index():
|
59 |
return '<iframe frameBorder="0" height="100%" src="{}/?__dark-theme={}" width="100%"></iframe>'.format(
|
60 |
+
os.getenv('INACCEL_URL'),request.args.get('__dark-theme', 'false'))
|
|
|
61 |
|
62 |
|
63 |
if __name__ == '__main__':
|