Likes
94
mux
seiveDubbing
HTTP
Dub Mux Videos using Sieve This Val exposes an HTTP endpoint that takes a Mux Asset ID and a list of languages, creates dubbed versions of the audio tracks using Sieve , then adds those dubbed audio tracks back to the Mux asset as new audio tracks. Usage: Required environment variables: Sieve API token ( SIEVE_API_KEY ) Mux Access token details ( MUX_TOKEN_ID , MUX_TOKEN_SECRET )
This endpoint requires an existing Mux asset that's ready with an audio-only static rendition associated with it. You can run this val to create a new one for testing. Make a POST request to the Val's endpoint with the following body, replacing the values with your own asset ID and the list of languages you want to create. {
"asset_id": "00OZ8VnQ01wDNQDdI8Qw3kf01FkGTtkMq2CW901ltq64Jyc",
"languages": ["es", "fr", "nl"]
} Limitations This is just a demo, so it's obviously not battle hardened. The biggest issue is that it does this whole process synchronously, so if the Sieve dubbing process takes longer than the Val's timeout, you're hosed.
2
stevekrouse
demoSDK
Script
Val Town REST API TypeScript SDK Demos This val demonstrates basic usage of the the Val Town JS/TS SDK. You can fork this val to your account to quickly try it out. Authentication is automatically set by the VAL_TOWN_API_KEY environment
variable, which is automatically set within Val Town. You can control the
API scopes of that key in your val's settings page. Learn more Reference docs
2
iamseeley
sendSMS
Script
💬 Email-to-SMS Send text messages on Val Town! Usage import { sendSMS } from 'https://esm.town/v/iamseeley/sendSMS';
sendSMS(phoneNumber: string, message: string, carrier: string): Promise<void> Parameters phoneNumber: The recipient's phone number (string of digits, no spaces or dashes) message: The text message you want to send carrier: The recipient's cell phone carrier. Supported carriers:
'att' (AT&T),
'tmobile' (T-Mobile),
'verizon' (Verizon),
'sprint' (Sprint) List of Email-To-SMS Addresses Comment on this val if you'd like me to add a carrier from the above list! Example import { sendSMS } from 'https://esm.town/v/iamseeley/sendSMS';
sendSMS('1234567890', 'Hello from Val Town!', 'verizon');
6
iamseeley
pipeline
Script
Using Pipeline import Pipeline from "https://esm.town/v/iamseeley/pipeline";
const pipeline = new Pipeline("task", "model");
const result = await pipeline.run(inputs);
exampleTranslation exampleTextClassification exampleFeatureExtraction exampleTextGeneration exampleSummarization exampleQuestionAnswering
1
iamseeley
hfApiGateway
HTTP
🤖 A gateway to Hugging Face's Inference API You can perform various NLP tasks using different models . The gateway supports multiple tasks, including feature extraction, text classification, token classification, question answering, summarization, translation, text generation, and sentence similarity. Features Feature Extraction : Extract features from text using models like BAAI/bge-base-en-v1.5 . Text Classification : Classify text sentiment, emotions, etc., using models like j-hartmann/emotion-english-distilroberta-base . Token Classification : Perform named entity recognition (NER) and other token-level classifications. Question Answering : Answer questions based on a given context. Summarization : Generate summaries of longer texts. Translation : Translate text from one language to another. Text Generation : Generate text based on a given prompt. Sentence Similarity : Calculate semantic similarity between sentences. Usage Send a POST request with the required inputs to the endpoint with the appropriate task and model parameters. Or use the default models. # Example Default Model Request
curl -X POST -H "Content-Type: application/json" -d '{"inputs": {"source_sentence": "Hello World", "sentences": ["Goodbye World", "How are you?", "Nice to meet you."]}}' "https://iamseeley-hfapigateway.web.val.run/?task=feature-extraction" Example Requests Feature Extraction curl -X POST -H "Content-Type: application/json" -d '{"inputs": ["Hello World", "Goodbye World"]}' "https://iamseeley-hfapigateway.web.val.run/?task=feature-extraction&model=BAAI/bge-base-en-v1.5" Feature Extraction curl -X POST -H "Content-Type: application/json" -d '{"inputs": {"source_sentence": "Hello World", "sentences": ["Goodbye World", "How are you?", "Nice to meet you."]}}' "https://iamseeley-hfapigateway.web.val.run/?task=feature-extraction&model=sentence-transformers/all-MiniLM-L6-v2" Text Classification curl -X POST -H "Content-Type: application/json" -d '{"inputs": "I love programming!"}' "https://iamseeley-hfapigateway.web.val.run/?task=text-classification&model=j-hartmann/emotion-english-distilroberta-base" Token Classification curl -X POST -H "Content-Type: application/json" -d '{"inputs": "My name is John and I live in New York."}' "https://iamseeley-hfApiGateway.web.val.run/?task=token-classification&model=dbmdz/bert-large-cased-finetuned-conll03-english" Question Answering curl -X POST -H "Content-Type: application/json" -d '{"inputs": {"question": "What is the capital of France?", "context": "The capital of France is Paris, a major European city and a global center for art, fashion, gastronomy, and culture."}}' "https://iamseeley-hfapigateway.web.val.run/?task=question-answering&model=deepset/roberta-base-squad2" Summarization curl -X POST -H "Content-Type: application/json" -d '{"inputs": "The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. During its construction, the Eiffel Tower surpassed the Washington Monument to become the tallest man-made structure in the world, a title it held for 41 years until the Chrysler Building in New York City was finished in 1930. It was the first structure to reach a height of 300 metres. Due to the addition of a broadcasting aerial at the top of the tower in 1957, it is now taller than the Chrysler Building by 5.2 metres (17 ft). Excluding transmitters, the Eiffel Tower is the second tallest free-standing structure in France after the Millau Viaduct."}' "https://iamseeley-hfapigateway.web.val.run/?task=summarization&model=sshleifer/distilbart-cnn-12-6" Translation curl -X POST -H "Content-Type: application/json" -d '{"inputs": "Hello, how are you?"}' "https://iamseeley-hfapigateway.web.val.run/?task=translation&model=google-t5/t5-small" Text Generation curl -X POST -H "Content-Type: application/json" -d '{"inputs": "Once upon a time"}' "https://iamseeley-hfapigateway.web.val.run/?task=text-generation&model=gpt2" Sentence Similarity curl -X POST -H "Content-Type: application/json" -d '{"inputs": {"source_sentence": "Hello World", "sentences": ["Goodbye World"]}}' "https://iamseeley-hfapigateway.web.val.run/?task=sentence-similarity&model=sentence-transformers/all-MiniLM-L6-v2" Val Examples Using Pipeline import Pipeline from "https://esm.town/v/iamseeley/pipeline";
// ...
} else if (req.method === "POST") {
const { inputs } = await req.json();
const pipeline = new Pipeline("task", "model");
const result = await pipeline.run(inputs);
return new Response(JSON.stringify(result), { headers: { "Content-Type": "application/json" } });
}
}
exampleTranslation exampleTextClassification exampleFeatureExtraction exampleTextGeneration exampleSummarization exampleQuestionAnswering
1