Reformat Markdown code blocks (#12795)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
Glenn Jocher 2024-05-18 18:58:06 +02:00 committed by GitHub
parent 2af71d15a6
commit fceea033ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
128 changed files with 1067 additions and 1018 deletions

View file

@ -220,22 +220,22 @@ For example, users can load a model, train it, evaluate its performance on a val
from ultralytics import YOLO
# Create a new YOLO model from scratch
model = YOLO('yolov8n.yaml')
model = YOLO("yolov8n.yaml")
# Load a pretrained YOLO model (recommended for training)
model = YOLO('yolov8n.pt')
model = YOLO("yolov8n.pt")
# Train the model using the 'coco8.yaml' dataset for 3 epochs
results = model.train(data='coco8.yaml', epochs=3)
results = model.train(data="coco8.yaml", epochs=3)
# Evaluate the model's performance on the validation set
results = model.val()
# Perform object detection on an image using the model
results = model('https://ultralytics.com/images/bus.jpg')
results = model("https://ultralytics.com/images/bus.jpg")
# Export the model to ONNX format
success = model.export(format='onnx')
success = model.export(format="onnx")
```
[Python Guide](usage/python.md){.md-button .md-button--primary}
@ -259,7 +259,7 @@ To gain insight into the current configuration of your settings, you can view th
print(settings)
# Return a specific setting
value = settings['runs_dir']
value = settings["runs_dir"]
```
=== "CLI"
@ -280,10 +280,10 @@ Ultralytics allows users to easily modify their settings. Changes can be perform
from ultralytics import settings
# Update a setting
settings.update({'runs_dir': '/path/to/runs'})
settings.update({"runs_dir": "/path/to/runs"})
# Update multiple settings
settings.update({'runs_dir': '/path/to/runs', 'tensorboard': False})
settings.update({"runs_dir": "/path/to/runs", "tensorboard": False})
# Reset settings to default values
settings.reset()