Captain

Generatecaptionsforimagesusingourimageprocessingmodel.

No captions generated yet. Please upload the image to start!

HowtoUseCaptainModel?

LearnhowtoleveragetheCaptainModelusingAPItotailorinstantmessagingfunctionalitiestofityourrequirements.

JavaScript (Request Format):

1async function sendRequestToAnalyzeImage(event) {
2  event.preventDefault();
3  const fileInput = document.getElementById("imageFile");
4  if (fileInput.files.length === 0) {
5    document.getElementById("output").innerHTML = "Please select an image file.";
6    return;
7  }
8
9  const formData = new FormData();
10  formData.append("api_key", "mulmodel_api_key");
11  formData.append("file", fileInput.files[0]);
12  formData.append("model_type", "captain");
13
14  const response = await fetch("https://wxm-back.vercel.app//request_analyze_image", {
15      method: "POST",
16      body: formData,
17  });
18
19  const result = await response.json();
20  document.getElementById("output").innerHTML = result.text;
21}

HTML (Structure Example):

1<h1>Image Analyze Request</h1>
2<form id="analyzeForm" enctype="multipart/form-data">
3    <label for="imageFile">Select Image:</label>
4    <input type="file" id="imageFile" name="file" accept="image/*" required><br><br>
5
6    <button type="submit">Analyze Image</button>
7</form>
8
9<span id="output"></span>

JSON (Response Format):

1{ 
2  "text": "Text Generated By Captain Model on Valid API Key"
3}
Copyright © 2024 WeXCode (AMK) - MulModel, All Rights Reserved.