Переглянути джерело

fix copy/paste errors in templates

also:
* sort the globs
* add a vid
master
Nimrod Kerrett 1 рік тому
джерело
коміт
db94409db8

+ 3
- 3
app.py Переглянути файл

@@ -258,7 +258,7 @@ def update_chat():
258 258
 @application.get("/enum/<topic>")
259 259
 def choices(topic):
260 260
     if topic in ["img", "bg", "bg-video", "audio"]:
261
-        choices = glob("static/media/{}/*.*".format(topic))
261
+        choices = sorted(glob("static/media/{}/*.*".format(topic)))
262 262
         titles = [os.path.basename(c) for c in choices]
263 263
         try:
264 264
             descdir = json.load(open("static/media/{}.json".format(topic)))
@@ -305,7 +305,7 @@ def save():
305 305
         return render_template("save.html",
306 306
                 suggestion=time.strftime(
307 307
                   "moment-%Y-%m-%d-%H.%M.%S"),
308
-                files = [os.path.basename(path).rsplit(".",1)[0] for path in glob("archive/*.json")])
308
+                files = [os.path.basename(path).rsplit(".",1)[0] for path in sorted(glob("archive/*.json"))])
309 309
 
310 310
 @application.route("/load", methods=['GET', 'POST'])
311 311
 def load():
@@ -320,7 +320,7 @@ def load():
320 320
         return redirect(url_for("home")+"#/oldest")
321 321
     else:
322 322
         return render_template("load.html",
323
-                files = [os.path.basename(path).rsplit(".",1)[0] for path in glob("archive/*.json")])
323
+                files = [os.path.basename(path).rsplit(".",1)[0] for path in sorted(glob("archive/*.json"))])
324 324
 
325 325
 @application.get("/embed-editor")
326 326
 def embed_editor():

BIN
static/media/bg-video/thunderstorm.mp4 Переглянути файл


+ 2
- 2
templates/chat.html Переглянути файл

@@ -68,11 +68,11 @@
68 68
                                             <div class="scrollable">
69 69
                                                 {% if moment.embed %}
70 70
                                                     {% if moment.embed.type == "youtube" %}
71
-                                                        <div class="iframe-container-{{embed.proportions}}">
71
+                                                        <div class="iframe-container-{{moment.embed.proportions}}">
72 72
                                                           <iframe src="https://www.youtube.com/embed/{{ moment.embed.code }}" allowfullscreen="allowfullscreen"></iframe>
73 73
 							</div>
74 74
                                                     {% elif moment.embed.type == "vimeo" %}
75
-                                                        <div class="iframe-container-{{embed.proportions}}">
75
+                                                        <div class="iframe-container-{{moment.embed.proportions}}">
76 76
                                                           <iframe src="https://player.vimeo.com/video/{{ moment.embed.code }}" allowfullscreen="allowfullscreen"></iframe>
77 77
 							</div>
78 78
                                                     {% endif %}

+ 2
- 2
templates/example.html Переглянути файл

@@ -65,11 +65,11 @@
65 65
                                             <div class="scrollable">
66 66
                                                 {% if moment.embed %}
67 67
                                                     {% if moment.embed.type == "youtube" %}
68
-                                                        <div class="iframe-container-{{embed.proportions}}">
68
+                                                        <div class="iframe-container-{{moment.embed.proportions}}">
69 69
                                                           <iframe src="https://www.youtube.com/embed/{{ moment.embed.code }}" allowfullscreen="allowfullscreen"></iframe>
70 70
 							</div>
71 71
                                                     {% elif moment.embed.type == "vimeo" %}
72
-                                                        <div class="iframe-container-{{embed.proportions}}">
72
+                                                        <div class="iframe-container-{{moment.embed.proportions}}">
73 73
                                                           <iframe src="https://player.vimeo.com/video/{{ moment.embed.code }}" allowfullscreen="allowfullscreen"></iframe>
74 74
 							</div>
75 75
                                                     {% endif %}

+ 2
- 2
templates/prompt.txt Переглянути файл

@@ -15,9 +15,9 @@ For example:
15 15
 {{example}}
16 16
 ```
17 17
 
18
-Assistant should try to pick bg_video and [optionally] soundtrack or video_content that fit the conversation topic and is beneficial to the user emotionally. These should not stay the same for more than one or two replies to keep the user interested.
18
+Assistant should try to pick bg_video and [optionally] soundtrack or video_content that fit the conversation topic and is beneficial to the user emotionally. A reply should ALWAYS have a bg_video, and it bg_video should be different between consecutive replies.
19 19
 
20
-Unlike bg_video, any *video_content* value can only be used ONCE in a session. If assistant runs out of options (or doesn't find anything appropriate for the situation), setting the use_video_content to false is the best option
20
+Unlike bg_video, any *video_content* value can only be used ONCE in a session. If assistant runs out of options (or doesn't find anything appropriate for the situation), setting the use_video_content to false is a good choice.
21 21
 
22 22
 Assistant can also incorporate images inside the markdown field in the format ![alt](src) but src should be a valid option according to the following enum (the corresponding enum_titles value can be used as alt)
23 23
 

Завантаження…
Відмінити
Зберегти