ehristoforu commited on
Commit
22c9c92
0 Parent(s):

Duplicate from CofAI/optor

Browse files
Files changed (4) hide show
  1. .gitattributes +27 -0
  2. README.md +9 -0
  3. index.html +53 -0
  4. style.css +28 -0
.gitattributes ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ftz filter=lfs diff=lfs merge=lfs -text
6
+ *.gz filter=lfs diff=lfs merge=lfs -text
7
+ *.h5 filter=lfs diff=lfs merge=lfs -text
8
+ *.joblib filter=lfs diff=lfs merge=lfs -text
9
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
10
+ *.model filter=lfs diff=lfs merge=lfs -text
11
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
12
+ *.onnx filter=lfs diff=lfs merge=lfs -text
13
+ *.ot filter=lfs diff=lfs merge=lfs -text
14
+ *.parquet filter=lfs diff=lfs merge=lfs -text
15
+ *.pb filter=lfs diff=lfs merge=lfs -text
16
+ *.pt filter=lfs diff=lfs merge=lfs -text
17
+ *.pth filter=lfs diff=lfs merge=lfs -text
18
+ *.rar filter=lfs diff=lfs merge=lfs -text
19
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
20
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
21
+ *.tflite filter=lfs diff=lfs merge=lfs -text
22
+ *.tgz filter=lfs diff=lfs merge=lfs -text
23
+ *.wasm filter=lfs diff=lfs merge=lfs -text
24
+ *.xz filter=lfs diff=lfs merge=lfs -text
25
+ *.zip filter=lfs diff=lfs merge=lfs -text
26
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
27
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: OPTOR with Dalle, Midjourney, Stable Diffusion
3
+ emoji: 🐻‍❄️
4
+ colorFrom: pink
5
+ colorTo: gray
6
+ sdk: static
7
+ pinned: true
8
+ duplicated_from: CofAI/optor
9
+ ---
index.html ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta
6
+ name="viewport"
7
+ content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1"
8
+ />
9
+
10
+ <script>
11
+ window.__gradio_mode__ = "app";
12
+ window.gradio_config = {"version": "3.0.13", "mode": "blocks", "dev_mode": false, "components": [{"id": 1, "type": "markdown", "props": {"value": "<h1><center>OPTOR</center></h1>", "name": "markdown", "visible": true, "style": {}}}, {"id": 2, "type": "markdown", "props": {"value": "<p>OPTOR will allow you to generate high-quality images based on a text query based on SD, Midjourney, Dalle-2!</p>\n", "name": "markdown", "visible": true, "style": {}}}, {"id": 3, "type": "group", "props": {"type": "group", "visible": true, "style": {}}}, {"id": 4, "type": "box", "props": {"type": "box", "visible": true, "style": {}}}, {"id": 5, "type": "row", "props": {"type": "row", "visible": true, "style": {"equal_height": true, "mobile_collapse": false}}}, {"id": 6, "type": "textbox", "props": {"lines": 1, "max_lines": 1, "value": "", "label": "Enter your prompt", "show_label": false, "name": "textbox", "visible": true, "style": {"container": false}}}, {"id": 7, "type": "button", "props": {"value": "Run", "variant": "primary", "name": "button", "visible": true, "style": {}}}, {"id": 8, "type": "gallery", "props": {"label": "Generated images", "show_label": false, "name": "gallery", "visible": true, "style": {"grid": [3], "height": "auto"}}}, {"id": 9, "type": "markdown", "props": {"value": "<details>\n<summary>LICENSE</summary>\n<p style='line-height: normal; font-size: small'>\nAll rights reserved to CoffAI, the technology is powered by the latest technology and you get it for free. You can copy the repositories wherever you want. Thank you!</a>.\n</p>\n</details>", "name": "markdown", "visible": true, "style": {}}}, {"id": 10, "type": "markdown", "props": {"value": "<hr />\n<p style='text-align: center'>\nCreated by <a href=\"https://texton-optor1.hf.space\" target=\"_blank\">CofAI</a> et al. 2023\n<br/>\n<a href=\"https://texton-optor2.hf.space\" target=\"_blank\">Discord</a> | <a href=\"https://texton-eh.hf.space\" target=\"_blank\">Evgeniy Hristoforu</a>\n<p style='text-align: center'>Powered by CofAI.api <a href=\"https://texton-cof1.hf.space/trc/\" target=\"_blank\">CofAI.api Engine</a>\n</p>", "name": "markdown", "visible": true, "style": {}}}], "theme": "default", "css": ".container { max-width: 800px; margin: auto; }", "enable_queue": false, "layout": {"id": 0, "children": [{"id": 1}, {"id": 2}, {"id": 3, "children": [{"id": 4, "children": [{"id": 5, "children": [{"id": 6}, {"id": 7}]}]}, {"id": 8}]}, {"id": 9}, {"id": 10}]}, "dependencies": [{"targets": [7], "trigger": "click", "inputs": [6], "outputs": [8], "backend_fn": false, "js": "\n async (text) => {\n try {\n response = await fetch('https://bf.dallemini.ai/generate', {\n method: 'POST',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n prompt: text\n })\n });\n response = await response.json()\n let imgs = response.images.map(r => \"data:image/png;base64,\" + r)\n return imgs\n } catch (e) {\n alert(\"Too much traffic, please try again.\")\n IMG = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAAOVBMVEXg4OB1dXXX19fd3d2EhIR9fX14eHjJycm2trbb29uurq6goKCZmZmIiIiBgYHNzc2np6e8vLySkpKXK8HrAAABuUlEQVR4nO3Z0bKCIBCAYQNFVCzr/R/2nHU6k8KpJi6wZf7vLu1id9gFhKYBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAb249h7pzr5jD29uhospnlfNo4L+boiLKYyZ0iblKYiu/iNER3PTquD9npPgbB98Za0/twH59JVasMtzXo1m+iHny7PrwpysSuebgxCtmOTlkma121l/TFZR2UqXxEebxEO/87QZlZ3inpeCPzVftkojUyJp2OWVgKy23qSsbg8evitBSXkUjHzYN9Is0oeWoYkkUKazsxRYlYKa6ldFSfs7K/8tsnUSLrXHAuG1SOXpp5t1LEiQxSe33ZqDJIC4TdkziRJkRN9J1CXFlpIj7J9RvNSd0kiUj1zSVjyiKr4X5yTRIx0kYlY8oinbzfFSaJWFlJSsaUpZpEqimttNkTOpo9nX4TOqbfdEFM6FgQpW7c8OofSrYo1Wwaq9nG1/NhVc2nbj2HD821kuOgeg7o3hyZBj1Hpo9D7M3K+HeIrSmPeq4Vfl3ruOhpnly9vdyEfa1KLkPF7nr66GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPjcD13rCcC3ILx/AAAAAElFTkSuQmCC\"\n return Array(9).fill(IMG)\n }\n }\n ", "status_tracker": null, "queue": null, "api_name": null}]};
13
+ </script>
14
+
15
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
16
+ <link
17
+ rel="preconnect"
18
+ href="https://fonts.gstatic.com"
19
+ crossorigin="anonymous"
20
+ />
21
+ <link
22
+ href="https://fonts.googleapis.com/css?family=Source Sans Pro"
23
+ rel="stylesheet"
24
+ />
25
+ <link
26
+ href="https://fonts.googleapis.com/css?family=IBM Plex Mono"
27
+ rel="stylesheet"
28
+ />
29
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.1/iframeResizer.contentWindow.min.js"></script>
30
+ <script type="module" crossorigin src="https://gradio.s3-us-west-2.amazonaws.com/3.0.9b12/assets/index.8eca4ae7.js"></script>
31
+ <link rel="stylesheet" href="https://gradio.s3-us-west-2.amazonaws.com/3.0.9b12/assets/index.cbea297d.css">
32
+ <style>
33
+ footer img {
34
+ display: none !important;
35
+ }
36
+ </style>
37
+ </head>
38
+
39
+ <body
40
+ style="
41
+ margin: 0;
42
+ padding: 0;
43
+ display: flex;
44
+ flex-direction: column;
45
+ flex-grow: 1;
46
+ "
47
+ >
48
+ <div
49
+ id="root"
50
+ style="display: flex; flex-direction: column; flex-grow: 1"
51
+ ></div>
52
+ </body>
53
+ </html>
style.css ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ body {
2
+ padding: 2rem;
3
+ font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
4
+ }
5
+
6
+ h1 {
7
+ font-size: 16px;
8
+ margin-top: 0;
9
+ }
10
+
11
+ p {
12
+ color: rgb(107, 114, 128);
13
+ font-size: 15px;
14
+ margin-bottom: 10px;
15
+ margin-top: 5px;
16
+ }
17
+
18
+ .card {
19
+ max-width: 620px;
20
+ margin: 0 auto;
21
+ padding: 16px;
22
+ border: 1px solid lightgray;
23
+ border-radius: 16px;
24
+ }
25
+
26
+ .card p:last-child {
27
+ margin-bottom: 0;
28
+ }