forked from Elvin-Ma/pytorch_guide
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from flask import Flask | ||
|
||
app = Flask(__name__) | ||
|
||
@app.route("/") | ||
def hello_world(): | ||
return "<p>Hello, World!</p>" | ||
|
||
|
||
if __name__ == '__main__': | ||
# app.debug = True | ||
# app.run(host='0.0.0.0', port=8987, debug=True) | ||
app.run(host='0.0.0.0', port=5000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# start docker | ||
- sudo systemctl start docker | ||
- sudo service docker start | ||
|
Binary file added
BIN
+382 Bytes
14-docker_image_container_guide/__pycache__/test_mtn.cpython-38.pyc
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from flask import Flask | ||
|
||
app = Flask(__name__) | ||
|
||
@app.route("/") | ||
def hello_world(): | ||
return "<p>Hello, World!</p>" | ||
|
||
|
||
if __name__ == '__main__': | ||
app.run(host='0.0.0.0', port=5000) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from ultralytics import YOLO | ||
|
||
|
||
# train | ||
# Load a model | ||
# model = YOLO('yolov8n-seg.yaml') # build a new model from YAML | ||
# model = YOLO('yolov8n-seg.pt') # load a pretrained model (recommended for training) | ||
# model = YOLO('yolov8n-seg.yaml').load('yolov8n.pt') # build from YAML and transfer weights | ||
|
||
# # Train the model | ||
# model.train(data='coco128-seg.yaml', epochs=100, imgsz=640) | ||
|
||
|
||
# inference | ||
# Load a model | ||
model = YOLO('yolov8n-seg.pt') # load an official model | ||
# model = YOLO('path/to/best.pt') # load a custom model | ||
|
||
# Predict with the model | ||
results = model('https://ultralytics.com/images/bus.jpg') # predict on an image | ||
print(results) |
Binary file not shown.