Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/images/create_new_folder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/download.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/model_training.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/placeholder-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/widgets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
230 changes: 117 additions & 113 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,126 +1,130 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<title>Zeroshot</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.25.0/themes/prism-okaidia.min.css" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Roboto', sans-serif;
background-color: #1a1a1a;
color: #f5f5f5;
padding: 20px;
line-height: 1.6;
}
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">

h1 {
font-size: 3em;
}

.container {
width: 60%;
margin: auto;
text-align: left;
}

.center {
text-align: center;
}

.steps {
margin-top: 2em;
}

.step-box {
background-color: #2c2c2c;
padding: 20px;
border-radius: 5px;
margin-bottom: 2em;
}

.button {
background-color: #27ae60;
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
transition: background-color 0.3s ease;
}

.button:hover {
background-color: #2ecc71;
}

a {
color: rgb(0, 98, 255);
}

a:visited {
color: rgb(0, 98, 255);
}

a.button:visited {
color: white;
}

img {
max-width: 100%;
}

.code-container {
background-color: #2c2c2c;
padding: 20px;
border-radius: 5px;
}

.code-container pre {
margin-top: 0;
margin-bottom: 0;
}
</style>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-tomorrow.min.css" rel="stylesheet" />
<title>zeroshot</title>
</head>
<body>
<div class="container">
<div class="center">
<h1>Zeroshot</h1>
<p>Like if GPT+Images had a baby brother. Check out our <a href="https://github.com/moonshinelabs-ai/zeroshot-python">Github</a>.</p>
</div>

<div class="steps">
<div class="step-box">
<h2>Step 1: Make image categories by describing them with text.</h2>
<div class="center">
<a href="https://usezeroshot.com" class="button">Create a Classifier in 60 Seconds</a>
</div>
<p>See our <a href="https://github.com/moonshinelabs-ai/zeroshot-python/blob/main/docs/getting_started.md">getting started</a> page for more detailed instructions.</p>
</div>

<div class="step-box">
<h2>Step 2: Use our code to automatically categorize new images.</h2>
<div class="center">
<div class="code-container">
<pre><code class="language-python">
model = zeroshot.Classifier(
"your model key here"
)
<!-- <header>
code for menu nav will be here
</header> -->

<main>
<div class="content">
<!-- landing page hero -->
<div class="hero-container">
<div class="hero-text-container">
<div class="hero-left">
<p class="hero-title">Harness the power of text to add computer vision to your app in minutes</p>
<p class="hero-subtext">Zeroshot is an open source tool for developers that creates image classifiers
from text descriptions</p>
<div class="hero-buttons">
<button class="try-button"> Try it out</button>
<button class="github-button">Github</button>
</div>
</div>
</div>

result = model.predict(url_or_ndarray)
class_name = model.classes[result]
<!-- show examples of image classification with gif -->
<div class="gif-container">
<img src="images/placeholder-image.png" class="hero-gif"/>
</div>
</div>
<!-- feature section -->
<div class="features-container">
<div class="feature-item">
<h3>Open Source</h3>
<p>Zeroshot is a free, community-driven product for versatile applications.</p>
<i class="fa fa-user-group feature-logo"></i>
</div>
<div class="feature-item">
<h3>Low Latency</h3>
<p>Fast and efficient real-time image classification. More accurate and faster than CLIP.</p>
<i class="fa fa-gauge-high feature-logo"></i>
</div>
<div class="feature-item">
<h3>Offline Access</h3>
<p>No internet required, you can use Zeroshot and deploy from anywhere, anytime.</p>
<i class="fa fa-globe feature-logo"></i>
</div>
</div>
<!-- video example -->
<div class="video-example-section">
<div class="video-container">
<img src="images/placeholder-image.png" class="video-example" />
</div>
<div class="video-text-container">
<p>Build a classifier <span class="highlight">in seconds</span>, with no labeling required.</p>
</div>
</div>
<!-- code example -->
<div class="code-example-section">
<div class="description-container">
<p>Deploy to CPU or GPU easily with a <span class="highlight">few lines of code</span></p>
</div>
<div class="code-container">
<pre>
<code class="language-py">
import zeroshot

# Create the classifier and preprocessing function.
classifier = zeroshot.Classifier(
"your model string or path"
)
preprocess_fn = zeroshot.create_preprocess_fn()

# Run the model! The result is the index of the prediction.
prediction = classifier.predict(preprocess_fn(image))
print(f"The image is class {prediction}")
</code>
</pre>
</div>
</div>
<!-- performance example -->
<div class="performance-section">
<div class="performance-chart-container">
<img src="images/placeholder-image.png" class="video-example" />
</div>
<div class="performance-text-container">
<p><span class="highlight">Save costs</span> with a fast, local model that doesn't cost money each time it's run.</p>
</div>
</div>

print(f'Prediction: "{class_name}"')
</code></pre>
</div>
<!-- update with svg files later when have time -->
<div class="how-container">
<p class="how-to-title">How it works</p>
<div class="how-to-box">
<img src="images/model_training.png" class="how-to-icon" />
<p class="how-to-text">Train your model</p>
</div>
<div class="how-to-box">
<img src="images/download.png" class="how-to-icon" />
<p class="how-to-text">Install Zeroshot</p>
</div>
<div class="how-to-box">
<img src="images/create_new_folder.png" class="how-to-icon" />
<p class="how-to-text">Import Zeroshot</p>
</div>
<div class="how-to-box">
<img src="images/widgets.png" class="how-to-icon" />
<p class="how-to-text">Use with your custom model</p>
</div>
<div class="how-to-box">
<button class="trainmodel-button">Train your custom model ></button>
</div>
</div>
</div>
</div>
</main>

<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.25.0/prism.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.25.0/components/prism-python.min.js"></script>
<!-- <footer>
code for footer
</footer> -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
</body>
</html>
Loading