test / index.html
terryyz's picture
Upload folder using huggingface_hub
4797717 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>VLM Interaction Simulator</title>
<meta name="description" content="Simulate interaction with a Vision Language Model (VLM) by uploading an image and providing a prompt.">
<meta name="keywords" content="VLM, Vision Language Model, AI, simulation, image analysis, front-end">
<link rel="stylesheet" href="assets/css/styles.css">
<!-- CDN for Icons (Font Awesome) -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
</head>
<body>
<header>
<div class="container header-content">
<h1>VLM Insight Generator</h1>
<p class="built-with">
<a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank">Built with anycoder</a>
</p>
</div>
</header>
<main class="container">
<section id="vlm-input">
<h2>1. Upload Image & Define Task</h2>
<form id="vlm-form">
<div class="input-group file-upload-area">
<label for="image-upload" class="sr-only">Upload Image</label>
<input type="file" id="image-upload" accept="image/*" required>
<div id="image-preview" class="image-preview">
<i class="fas fa-image"></i>
<p>Click to select an image</p>
<img id="preview-img" src="" alt="Image Preview" class="hidden">
</div>
</div>
<div class="input-group">
<label for="prompt">2. Ask the VLM a question:</label>
<textarea id="prompt" rows="4" placeholder="e.g., Describe the main objects in this image and analyze their relationship." required></textarea>
</div>
<button type="submit" id="submit-btn">
<i class="fas fa-magic"></i> Generate VLM Analysis
</button>
</form>
</section>
<section id="vlm-output" class="hidden">
<h2>3. VLM Response</h2>
<div id="response-area" class="response-card">
<!-- Response will be injected here -->
<div id="loading-spinner" class="spinner hidden"></div>
<p id="response-text"></p>
</div>
</section>
</main>
<footer>
<div class="container">
<p>&copy; 2024 VLM Simulator Demo. All rights reserved.</p>
</div>
</footer>
<script src="assets/js/app.js"></script>
</body>
</html>