Well that was a stupid thing to do, wasn't it?
Try starting up from Internet Recovery holding down
Shift (⇧) - Option (⌥) - Command (⌘) - R when you start up your Mac. If that doesn't work, you will need to get a copy of macOS onto a pen drive to reinstall the operating system. You'll need another Mac in order to do this. If you have another Mac to use, download macOS from the Mac App Store and follow the instructions
in this Apple Support article to create a bootable macOS installer. Once you've got macOS ready on a pen drive, start up your Mac and hold down the Option (⌥) key to enter the boot menu. You should see two drives listed – using the arrow keys on your keyboard, select the pen drive you put macOS on and press Enter to boot into the macOS installer.
When the macOS installer boots, you'll need to erase the drive so it is prepared for macOS. In the macOS installer, go to Utilities > Disk Utility from the menu and select your computer's built-in drive from the left-side and erase it. Make sure you select
Mac OS Extended (Journaled) as the format. The installer will automatically convert the drive to the
APFS format if it needs to. Please note by erasing the drive you'll lose all the data currently on it.
If you have a Time Machine backup, plug in the hard drive before you begin reinstalling macOS. You'll be given the option to restore from this backup when you go through the macOS install process. If you don't have a Time Machine backup, then I'm afraid you've lost all your data.
If you don't have another Mac to create a bootable macOS installer, you'll need to go to an Apple Store and explain the situation to them (I would recommend making a
Genius Bar reservation). They should have bootable macOS installers for the Genius Bar engineers to use who will be able to reinstall macOS for you. They may charge you for this service but they will advise you of that before they help you. If you don't have an Apple Store nearby, you'll need to go to a
local Apple Authorised Service Provider instead.