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
import React, { useState, useEffect, useRef } from 'react' | |
import Navbar from '../../components/Navbar/Navbar' | |
import BroadcastButton from '../../components/Buttons/BroadcastButton' | |
import Timer from '../../components/Timer/Timer' | |
import formatTime from '../../utils/formatTime' | |
import getCookie from '../../utils/getCookie' | |
import API from '../../api/api' | |
import './Broadcast.css' | |
const CAPTURE_OPTIONS = { |
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
const mongoose = require('mongoose') | |
const Schema = mongoose.Schema | |
// Create a new schema for uploaded documents | |
const DocumentUploadSchema = new Schema({ | |
title: String, | |
description: String, | |
fileName: String, | |
uploadDate: { |
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
def run_inference(access_token): | |
url = "https://inference.datacrunch.io/v1/audio/whisperx-v2/generate" | |
headers = { | |
"Content-Type": "application/json", | |
"Authorization": f"Bearer {access_token}" | |
} | |
data = { | |
"audio_input": "https://audio.adjustleads.com/baltimore-city/recording_1710384621017.mp3" | |
} |
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
import torch | |
from diffusers import StableDiffusionPipeline | |
import matplotlib.pyplot as plt | |
import time | |
begin = time.time() | |
pipe = StableDiffusionPipeline.from_pretrained( | |
"runwayml/stable-diffusion-v1-5", |
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
import puppeteer from 'puppeteer' | |
import 'dotenv/config' | |
// import screenshot from '../screenshot.js' | |
const PROD_CONFIG = { | |
headless: true, | |
ignoreHTTPSErrors: true, | |
args: ['--no-sandbox', '--disable-setuid-sandbox'], | |
ignoreDefaultArgs: ['--disable-extensions'], | |
} |
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
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction | |
import { NextResponse } from 'next/server' | |
export const runtime = 'edge' | |
export async function POST(req, res) { | |
const body = await req.json() | |
const { text, model } = body |
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
curl --location --request POST 'https://wreudwglze.execute-api.us-west-1.amazonaws.com/default/techLookup' \ | |
--header 'Content-Type: application/json' \ | |
--data-raw '{ | |
"url": "<PUT_COMPANY_URL_HERE>" | |
}' |
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
axios.post( | |
'https://7a6to3aeyb.execute-api.us-west-1.amazonaws.com/default/notify', | |
{ | |
email_of_user: 'USERS_THAT_REGISTERED_EMAIL_ADDRESS', | |
email_of_recepient: 'YOUR_EMAIL_ADDRESS_HERE', | |
} | |
) |
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
curl --location --request POST 'https://7a6to3aeyb.execute-api.us-west-1.amazonaws.com/default/notify' \ | |
--header 'Content-Type: application/json' \ | |
--data-raw '{ | |
"email_of_user": "USER_THAT_REGISTERED_EMAIL_ADDRESS_HERE", | |
"email_of_recepient": "YOUR_EMAIL_ADDRESS_HERE" | |
}' |
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
import requests | |
import json | |
url = "https://7a6to3aeyb.execute-api.us-west-1.amazonaws.com/default/notify" | |
payload = json.dumps({ | |
"email_of_user": "USERS_THAT_REGISTERED_EMAIL_ADDRESS", | |
"email_of_recepient": "YOUR_EMAIL_ADDRESS_HERE" | |
}) | |
headers = { |
NewerOlder