Sfoglia il codice sorgente

Add README

Bump experimental `/img` to Dal E 3
master
The Dod 10 mesi fa
parent
commit
69714a7cc5
3 ha cambiato i file con 17 aggiunte e 1 eliminazioni
  1. 1
    0
      .gitignore
  2. 15
    0
      README.md
  3. 1
    1
      app.py

+ 1
- 0
.gitignore Vedi File

@@ -6,3 +6,4 @@ flask_session/
6 6
 work/
7 7
 .env
8 8
 *.swp
9
+*.backup

+ 15
- 0
README.md Vedi File

@@ -0,0 +1,15 @@
1
+#### Running
2
+
3
+* `./debug-server.sh`
4
+* Browse to [http://localhost:5000]
5
+
6
+#### Prompt files
7
+
8
+Prompt template is at [templates/prompt.txt](templates/prompt.txt).
9
+
10
+The sources of the fields are:
11
+
12
+* **{{user}}** — One of the files at [static/users](static/users), describing current user.
13
+* **{{schema}}** — [static/chat.schema.json](static/chat.schema.json) (after dereference). Describing the syntax [and some semantics] of JSON replies we expect from the assistant.
14
+* **{{example}}** — [static/chat-example.json](static/chat-example.json)
15
+* **{{img_enum}}** — Available images (including text description). See [here](http://localhost:5000/enum/img) (while server is running)

+ 1
- 1
app.py Vedi File

@@ -344,7 +344,7 @@ def image():
344 344
     else:
345 345
         prompt = request.form["prompt"]
346 346
         alt = prompt
347
-        response = openai.Image.create(prompt=prompt, n=1, size="1024x1024")
347
+        response = openai.Image.create(prompt=prompt, model="dall-e-3", n=1, size="1024x1024")
348 348
         src = response['data'][0]['url']
349 349
     return render_template("image.html", src=src, alt=alt, prompt=prompt)
350 350
 

Loading…
Annulla
Salva