favicon
This commit is contained in:
parent
2349af1b13
commit
62a0d2f6c0
4 changed files with 14 additions and 2 deletions
13
app.py
13
app.py
|
|
@ -1,4 +1,4 @@
|
|||
from flask import Flask, render_template, request
|
||||
from flask import Flask, render_template, request, send_from_directory
|
||||
from flask_socketio import SocketIO, emit, join_room
|
||||
|
||||
import eventlet
|
||||
|
|
@ -53,6 +53,11 @@ with app.app_context():
|
|||
db.create_all()
|
||||
|
||||
|
||||
@app.route("/favicon.ico")
|
||||
def favicon():
|
||||
return send_from_directory(os.path.join(app.root_path, "static"), "favicon.ico")
|
||||
|
||||
|
||||
@app.route("/")
|
||||
def index():
|
||||
return render_template("index.html")
|
||||
|
|
@ -110,7 +115,11 @@ def handle_message(data):
|
|||
room=data["room"],
|
||||
)
|
||||
|
||||
if "claude" in data["message"] or "gpt-3" in data["message"] or "gpt-4" in data["message"]:
|
||||
if (
|
||||
"claude" in data["message"]
|
||||
or "gpt-3" in data["message"]
|
||||
or "gpt-4" in data["message"]
|
||||
):
|
||||
# Emit a temporary message indicating that llm is processing
|
||||
emit(
|
||||
"message",
|
||||
|
|
|
|||
BIN
static/favicon.ico
Normal file
BIN
static/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
|
|
@ -13,6 +13,8 @@
|
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.1/socket.io.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/9.1.2/marked.min.js" integrity="sha512-rfX4p3RNnxdwLT3wWP1K0NR3ztTobn+sISlT9WhxDDK00zNYbQ6MCHA5OHm0hqKAzEMXYCgFrp8iY/ER5MkXqA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
|
||||
<link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}">
|
||||
|
||||
<style>
|
||||
html, body {
|
||||
height: 100%;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Chatroom</title>
|
||||
<link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.1/socket.io.min.js"></script>
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
<style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue