Spaces:
Sleeping
Sleeping
Commit
·
003f5ab
1
Parent(s):
5f0c247
Updated demo message
Browse files- docs/instruction.py +1 -1
- ui/coding.py +3 -0
- ui/instructions.py +0 -3
docs/instruction.py
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
instruction = {
|
| 4 |
"demo": """
|
| 5 |
<span style="color: red;">
|
| 6 |
-
This
|
| 7 |
</span>
|
| 8 |
""",
|
| 9 |
"introduction": """
|
|
|
|
| 3 |
instruction = {
|
| 4 |
"demo": """
|
| 5 |
<span style="color: red;">
|
| 6 |
+
This service is running in demo mode with limited performance. For a better experience, run the service locally, please refer to the Instructions tab for more details.
|
| 7 |
</span>
|
| 8 |
""",
|
| 9 |
"introduction": """
|
ui/coding.py
CHANGED
|
@@ -11,6 +11,7 @@ from typing import List, Dict, Generator, Optional, Tuple
|
|
| 11 |
from functools import partial
|
| 12 |
from api.llm import LLMManager
|
| 13 |
from api.audio import TTSManager, STTManager
|
|
|
|
| 14 |
|
| 15 |
|
| 16 |
def send_request(
|
|
@@ -111,6 +112,8 @@ def get_problem_solving_ui(llm: LLMManager, tts: TTSManager, stt: STTManager, de
|
|
| 111 |
send_request_partial = partial(send_request, llm=llm, tts=tts)
|
| 112 |
|
| 113 |
with gr.Tab("Interview", render=False, elem_id=f"tab") as problem_tab:
|
|
|
|
|
|
|
| 114 |
chat_history = gr.State([])
|
| 115 |
previous_code = gr.State("")
|
| 116 |
hi_markdown = gr.Markdown(
|
|
|
|
| 11 |
from functools import partial
|
| 12 |
from api.llm import LLMManager
|
| 13 |
from api.audio import TTSManager, STTManager
|
| 14 |
+
from docs.instruction import instruction
|
| 15 |
|
| 16 |
|
| 17 |
def send_request(
|
|
|
|
| 112 |
send_request_partial = partial(send_request, llm=llm, tts=tts)
|
| 113 |
|
| 114 |
with gr.Tab("Interview", render=False, elem_id=f"tab") as problem_tab:
|
| 115 |
+
if os.getenv("IS_DEMO"):
|
| 116 |
+
gr.Markdown(instruction["demo"])
|
| 117 |
chat_history = gr.State([])
|
| 118 |
previous_code = gr.State("")
|
| 119 |
hi_markdown = gr.Markdown(
|
ui/instructions.py
CHANGED
|
@@ -8,9 +8,6 @@ from utils.ui import get_status_color
|
|
| 8 |
|
| 9 |
def get_instructions_ui(llm, tts, stt, default_audio_params):
|
| 10 |
with gr.Tab("Instruction", render=False) as instruction_tab:
|
| 11 |
-
if os.getenv("IS_DEMO"):
|
| 12 |
-
gr.Markdown(instruction["demo"])
|
| 13 |
-
|
| 14 |
with gr.Row():
|
| 15 |
with gr.Column(scale=2):
|
| 16 |
gr.Markdown(instruction["introduction"])
|
|
|
|
| 8 |
|
| 9 |
def get_instructions_ui(llm, tts, stt, default_audio_params):
|
| 10 |
with gr.Tab("Instruction", render=False) as instruction_tab:
|
|
|
|
|
|
|
|
|
|
| 11 |
with gr.Row():
|
| 12 |
with gr.Column(scale=2):
|
| 13 |
gr.Markdown(instruction["introduction"])
|