Refactor everything (#3481)
This commit is contained in:
parent
d4b851bdc8
commit
65aa11890f
19 changed files with 1306 additions and 1178 deletions
|
|
@ -1,4 +1,3 @@
|
|||
import json
|
||||
from pathlib import Path
|
||||
|
||||
import gradio as gr
|
||||
|
|
@ -11,9 +10,9 @@ with open(Path(__file__).resolve().parent / '../css/main.css', 'r') as f:
|
|||
css = f.read()
|
||||
with open(Path(__file__).resolve().parent / '../css/chat.css', 'r') as f:
|
||||
chat_css = f.read()
|
||||
with open(Path(__file__).resolve().parent / '../css/main.js', 'r') as f:
|
||||
with open(Path(__file__).resolve().parent / '../js/main.js', 'r') as f:
|
||||
main_js = f.read()
|
||||
with open(Path(__file__).resolve().parent / '../css/save_files.js', 'r') as f:
|
||||
with open(Path(__file__).resolve().parent / '../js/save_files.js', 'r') as f:
|
||||
save_files_js = f.read()
|
||||
|
||||
refresh_symbol = '🔄'
|
||||
|
|
@ -30,6 +29,11 @@ theme = gr.themes.Default(
|
|||
background_fill_secondary='#eaeaea'
|
||||
)
|
||||
|
||||
if Path("notification.mp3").exists():
|
||||
audio_notification_js = "document.querySelector('#audio_notification audio')?.play();"
|
||||
else:
|
||||
audio_notification_js = ""
|
||||
|
||||
|
||||
def list_model_elements():
|
||||
elements = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue