IliaLarchenko commited on
Commit
003f5ab
1 Parent(s): 5f0c247

Updated demo message

Browse files
Files changed (3) hide show
  1. docs/instruction.py +1 -1
  2. ui/coding.py +3 -0
  3. ui/instructions.py +0 -3
docs/instruction.py CHANGED
@@ -3,7 +3,7 @@
3
  instruction = {
4
  "demo": """
5
  <span style="color: red;">
6
- This demo uses a free tier server and free API with strict request limits and limited capabilities for some models. For a significantly better experience, run the service locally. The demo performance is worse than of a locally running service (slow, buggy, robotic voice, too short messages, etc.). If some model is unavailable, please wait a minute before retrying. Persistent unavailability might mean that the request limit has been reached and demo is unavailable for a while.
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"])