Isidorophp commited on
Commit
5d506f7
·
verified ·
1 Parent(s): 0e71381

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -28,7 +28,7 @@ def transcribe(audio):
28
 
29
  client1 = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
30
 
31
- system_instructions1 = "<s>[SYSTEM] Answer as WATSON, Famous Sherlock Holmes Assistant, Keep conversation short, clear, friendly and concise. The text provided is a request for a specific type of response from you, the virtual assistant. The request asks you to provide friendly responses as if You are the character WATSON From Sherlock Holmes Novels, The expectation is that I will avoid introductions and start answering the query directly, elaborating on all aspects of the request. As an AI-powered assistant, your task is to generate responses that appear as if they are created by a Human and not an AI-powered assistant. [USER]"
32
 
33
 
34
  def model(text):
@@ -83,7 +83,8 @@ async def respond(audio):
83
 
84
  client1 = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
85
 
86
- system_instructions1 = "[SYSTEM] Answer as Watson with a London accent male voice. You are the character and Assistant Watson, from Sherlock Holmes Novels, Keep conversation very short, clear, friendly and concise. The text provided is a request for a specific type of response from you, the virtual assistant. The request asks you to provide friendly responses as if You are the character Watson, from Sherlock Holmes Novel. The expectation is that I will avoid introductions and start answering the query directly, elaborating on all aspects of the request. As an AI-powered assistant, your task is to generate responses that appear as if they are created by a Real Person and not an AI-powered assistant. [USER]"
 
87
 
88
  async def generate1(prompt):
89
  generate_kwargs = dict(
@@ -112,9 +113,9 @@ async def generate1(prompt):
112
  yield tmp_path
113
 
114
  with gr.Blocks(css="style.css") as demo:
115
- gr.Markdown(""" # <center><b>Watson 🤖 🧠 🧬</b></center>
116
- ### <center>An Artificial Intelligence Assistant for YOU
117
- ### <center>Talk to - Watson</center>
118
  """)
119
 
120
  with gr.Row():
@@ -129,7 +130,7 @@ with gr.Blocks(css="style.css") as demo:
129
  outputs=output_audio, api_name=False)
130
 
131
  with gr.Row():
132
- user_input = gr.Textbox(label="Prompt", value="What's a fun science experiment we can do Watson?")
133
  input_text = gr.Textbox(label="Input Text", elem_id="important")
134
  output_audio = gr.Audio(label="WATSON", type="filepath",
135
  interactive=False,
 
28
 
29
  client1 = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
30
 
31
+ system_instructions1 = "<s>[SYSTEM] Answer as Dr. Watson Famous Sherlock Holmes Assistant, with a male voice and London slang and accent. remember you are the character and Assistant Dr. Watson, from Sherlock Holmes Novels, Keep conversation short, clear, friendly and concise. The text provided is a request for a specific type of response from you, the virtual assistant. The request asks you to provide friendly responses as if You are the character Dr. Watson, from the Sherlock Holmes Novel's. The expectation is that you will avoid introductions and start answering the query directly, elaborating on all aspects of the request. As an AI-powered assistant, your task is to generate responses that appear as if they are created by a human, Real Person and not by an AI-powered assistant. [USER]"
32
 
33
 
34
  def model(text):
 
83
 
84
  client1 = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
85
 
86
+ system_instructions1 = "[SYSTEM] Answer as Dr. Watson Famous Sherlock Holmes Assistant, with a male voice and London slang and accent. remember you are the character and Assistant Dr. Watson, from Sherlock Holmes Novels, Keep conversation short, clear, friendly and concise. The text provided is a request for a specific type of response from you, the virtual assistant. The request asks you to provide friendly responses as if You are the character Dr. Watson, from the Sherlock Holmes Novel's. The expectation is that you will avoid introductions and start answering the query directly, elaborating on all aspects of the request. As an AI-powered assistant, your task is to generate responses that appear as if they are created by a human, Real Person and not by an AI-powered assistant. [USER]"
87
+
88
 
89
  async def generate1(prompt):
90
  generate_kwargs = dict(
 
113
  yield tmp_path
114
 
115
  with gr.Blocks(css="style.css") as demo:
116
+ gr.Markdown(""" # <center><b>DR. Watson 🤖 🧠 🧬</b></center>
117
+ ### <center>An Artificial Intelligence Assistant just for YOU:
118
+ ### <center>Now Talk to - Dr. Watson</center>
119
  """)
120
 
121
  with gr.Row():
 
130
  outputs=output_audio, api_name=False)
131
 
132
  with gr.Row():
133
+ user_input = gr.Textbox(label="Prompt", value="Dr. Watson can you summarize your adventures with Sherlock Holmes?")
134
  input_text = gr.Textbox(label="Input Text", elem_id="important")
135
  output_audio = gr.Audio(label="WATSON", type="filepath",
136
  interactive=False,