Skip to content

Instantly share code, notes, and snippets.

View dineshkumarsarangapani's full-sized avatar
🎯
Focusing

Dinesh Kumar Sarangapani dineshkumarsarangapani

🎯
Focusing
View GitHub Profile
{"prompt":"I need an API that can estimate the relative depth of objects from a single image. The output should be an inverse depth map.\n\n###\n\n","completion":" {'domain': 'Classification', 'api_call': \"model = torch.hub.load('intel-isl\/MiDaS', 'DPT_Hybrid', pretrained=True)\", 'api_provider': 'PyTorch', 'explanation': \"Load the pretrained MiDaS model for estimating relative depth from a single image, which outputs an inverse depth map.\", 'code': 'import torch\nmodel = torch.hub.load(\"intel-isl\/MiDaS\", \"DPT_Hybrid\", pretrained=True)'}###"}
{"prompt":"I need an API to detect different types of vehicles, people, and lanes in an image captured from a camera mounted on a self-driving car.\n\n###\n\n","completion":" {'domain': 'Object Detection', 'api_call': \"model = torch.hub.load('hustvl\/yolop', 'yolop', pretrained=True)\", 'api_provider': 'PyTorch', 'explanation': 'Load the YOLOP model from PyTorch Hub with pre-trained weights optimized for object detection, drivable area segmentation, and lane de
@dineshkumarsarangapani
dineshkumarsarangapani / min-char-rnn.py
Created December 27, 2018 12:29 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)