Skip to content

Instantly share code, notes, and snippets.

View ehzawad's full-sized avatar
🎃
Wasteland Baby!

ehzawad ehzawad

🎃
Wasteland Baby!
View GitHub Profile
const products = [
{ title: 'Cabbage', isFruit: false, id: 1 },
{ title: 'Garlic', isFruit: false, id: 2 },
{ title: 'Apple', isFruit: true, id: 3 },
];
export function ShoppingList() {
const listItems = products.map(product =>
<li
key={product.id}
from flask import Flask, render_template, request as rqst, jsonify
from flask_socketio import SocketIO, emit
import sys
from flask_cors import CORS
import argparse
import queue
import sys
import json
import asyncio
import math
import random
# Initial state: a random number between 0 and 2π
def initial_state():
return random.uniform(0, 2*math.pi)
# Neighbor: a new state very close to the current one
def neighbor(state):
new_state = state + random.gauss(0, 0.1)
import json
import gradio as gr
import numpy as np
from vosk import KaldiRecognizer, Model
model = Model(model_path="/home/gns/vosk-api/model/")
@ehzawad
ehzawad / cuda.sh
Created May 30, 2023 16:13
nvidia cuda installation sequence
[INFO]: Driver not installed.
[INFO]: Checking compiler version...
[INFO]: gcc location: /usr/bin/gcc
[INFO]: gcc version: gcc version 12.1.0 (Ubuntu 12.1.0-2ubuntu1~22.04)
[INFO]: Initializing menu
[INFO]: nvidia-fs.setKOVersion(2.15.3)
[INFO]: Setup complete
[INFO]: Installing: Driver
from transformers import pipeline
# asr = pipeline("automatic-speech-recognition", model="ehzawad/whisper-tiny-bn")
# output = asr("/root/ehz_asr/sample_bn.mp3", chunk_length_s=600)
# print(output)
# print(type(output))
from transformers import pipeline
import gradio as gr
pipe = pipeline(model="ehzawad/whisper-tiny-bn")
def transcribe(audio):
text = pipe(audio)["text"]
return text
@ehzawad
ehzawad / whisper.md
Last active May 17, 2023 12:05
openai asr whisper

In your current code, the Seq2SeqTrainingArguments class is responsible for saving checkpoints. The save_steps attribute dictates how often a checkpoint is saved. If a checkpoint is saved, you can resume training from that checkpoint at any time. Your current save_steps is set to 1000, meaning a checkpoint will be saved every 1000 steps.

If you want to save checkpoints more frequently, you can decrease the value of save_steps.

Here's the complete refactored version of your code:

import torch
from dataclasses import dataclass
from typing import Any, Dict, List, Union
@ehzawad
ehzawad / CUDA_Compilers.md
Created May 11, 2023 08:29 — forked from ax3l/CUDA_Compilers.md
CUDA Compilers
@ehzawad
ehzawad / cuda.md
Created May 11, 2023 08:13
cuda shi..
To find NVIDIA kernel modules:
bash
Copy code
find /lib/modules/$(uname -r)/kernel/drivers -type f -name 'nvidia*.ko*'
To find NVIDIA libraries in /usr/lib and /usr/lib64:
bash
Copy code
find /usr/lib /usr/lib64 -type f -name 'libnvidia*'