-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.html
94 lines (89 loc) · 5.97 KB
/
main.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="img/icon_x32.png">
<title>Alt Text Creator</title>
<link href="css/bootstrap.css" rel="stylesheet">
</head>
<body>
<!-- Header -->
<div class="container-fluid bg-light mb-5">
<div class="container bg-light py-5">
<div class="row">
<div class="col-9">
<h1 class="display-5 fw-bold">Alt Text Creator <span id="version"></span> is now installed!</h1>
<p>This update adds support for GPT-4o, GPT-4o Mini, and custom servers! Check out the <a href="https://github.com/corbindavenport/alt-text-creator/releases/latest" target="_blank">full changelog</a> for more details.</p>
</div>
</div>
</div>
</div>
<!-- Main container -->
<div class="container">
<div class="row">
<!-- Main settings -->
<div class="col-md-8">
<h2>Settings</h2>
<!-- Image generation service -->
<div class="mb-3">
<label for="alt-text-generator" class="form-label">Text generation service</label>
<select id="alt-text-generator" class="form-select" aria-labelledby="alt-text-generator-help">
<option value="gpt-4o-mini">OpenAI GPT-4o Mini (faster, less expensive)</option>
<option value="gpt-4o">OpenAI GPT-4o</option>
<option value="local-server">Custom local server</option>
</select>
<div id="alt-text-generator-help" class="form-text text-muted mb-2">
OpenAI models require a valid API key. Alt Text Generator uses GPT-4o by default.
</div>
</div>
<!-- OpenAI API key -->
<div class="mb-3">
<label for="openai-key" class="form-label">OpenAI API Key</label>
<input type="text" class="form-control" id="openai-key" aria-describedby="openai-help" autocomplete="off">
<div id="openai-help" class="form-text text-muted mb-2">
You can <a href="https://platform.openai.com/api-keys" target="_blank">create a key</a> from the OpenAI website.
</div>
<a href="https://platform.openai.com/usage" target="_blank">
<button type="button" class="btn btn-outline-primary w-100 mb-1">Check OpenAI API usage and costs</button>
</a>
</div>
<!-- Local server settings -->
<div class="mb-3">
<label for="custom-server-ip" class="form-label">Custom server IP</label>
<input type="text" class="form-control" id="custom-server-ip" aria-describedby="custom-help" autocomplete="off" placeholder="localhost:1234">
<div id="custom-help" class="form-text text-muted mb-2">
You can use a custom server running an OpenAI-like API. The text generation service must be set to "Custom local server". See the <a href="https://github.com/corbindavenport/alt-text-creator/blob/main/CUSTOM.md" target="_blank">documentation</a> for more information.
</div>
</div>
<!-- How to use -->
<h2>How to use</h2>
<p>This extension uses the <a href="https://platform.openai.com/docs/guides/vision" target="_blank">GPT-4o</a> large language model to generate <a href="https://en.wikipedia.org/wiki/Alt_attribute" target="_blank">alternate text</a> for any image, which is read by search engines, screen readers, and other tools. You can right-click on any image and select "Generate Alt Text" to generate alternative text for an image. After a few seconds, a notification will appear with the generated text, which is automatically copied to your clipboard.</p>
<p>You must supply your own <a href="https://platform.openai.com/api-keys" target="_blank">API key</a> from OpenAI and <a href="https://help.openai.com/en/articles/7102672-how-can-i-access-gpt-4-gpt-4-turbo-gpt-4o-and-gpt-4o-mini#:~:text=usage%20tier%201" target="_blank">unlock usage tier 1 on your OpenAI account</a> for the extension to work. OpenAI charges for API access after free credit runs out, and you can <a href="https://openai.com/pricing#:~:text=Vision%20pricing%20calculator" target="_blank">check current pricing</a> from the OpenAI website (click the "Low Resolution" checkbox). This extension uses the Low Resolution mode and caches responses locally to reduce costs as much as possible.</p>
<p>The generated alternate text might be incorrect sometimes. Be sure to always follow <a href="https://support.microsoft.com/en-us/office/everything-you-need-to-know-to-write-effective-alt-text-df98f884-ca3d-456c-807b-1a1fa82f5dc2">best practices for writing alt text</a>!</p>
</div>
<!-- Donation -->
<div class="col-md-4">
<h2>Donate</h2>
<p>If you find Alt Text Creator useful, please donate to support continued development. It would mean a lot!</p>
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=4SZVSMJKDS35J&lc=US&item_name=Alt%20Text%20Donation¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted" target="_blank">
<button type="button" class="btn btn-success w-100 mb-3">Donate via PayPal</button>
</a>
<a href="https://cash.app/$corbdav" target="_blank">
<button type="button" class="btn btn-success w-100 mb-3">Donate via Cash App</button>
</a>
<p>Alt Text Creator is developed by <a href="https://corbin.io/?utm_source=Alt%20Text%20Extension">Corbin Davenport</a>.</p>
<h2>Need help?</h2>
<p>If something isn't working, or if you just want to chat with other users, <a href="https://github.com/corbindavenport/alt-text-creator" target="_blank">create an issue on GitHub</a> or <a href="https://discord.com/invite/59wfy5cNHw" target="_blank">join the Discord server</a>.</p>
</div>
</div>
<!-- Footer -->
<div class="row">
<div class="bg-light rounded-3 pt-3 pb-3 mt-5 mb-5">
Alt Text Creator uses code from <a href="https://getbootstrap.com/" target="_blank">Bootstrap</a> and uses the OpenAI API. You can find Alt Text Creator's source code <a href="https://github.com/corbindavenport/alt-text-creator" target="_blank">on GitHub</a>, under the GPL license.</div>
</div>
</div>
<script src="js/main.js"></script>
</body>
</html>