Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -41,10 +41,10 @@ def randomize_seed_fn(seed: int) -> int:
|
|
41 |
return seed
|
42 |
|
43 |
system_instructions1 = """
|
44 |
-
[SYSTEM] Answer as
|
45 |
-
Keep
|
46 |
Avoid unnecessary introductions and answer the user's questions directly.
|
47 |
-
Respond in a
|
48 |
[USER]
|
49 |
"""
|
50 |
|
@@ -63,7 +63,7 @@ def models(text, model="Mixtral 8x7B", seed=42):
|
|
63 |
max_new_tokens=300,
|
64 |
seed=seed
|
65 |
)
|
66 |
-
formatted_prompt = system_instructions1 + text + "[
|
67 |
stream = client.text_generation(
|
68 |
formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
69 |
output = ""
|
@@ -101,9 +101,9 @@ def download_history():
|
|
101 |
href = f'data:text/csv;base64,{b64}'
|
102 |
return gr.HTML(f'<a href="{href}" download="chat_history.csv">Download Chat History</a>')
|
103 |
|
104 |
-
DESCRIPTION = """ # <center><b>
|
105 |
-
### <center>
|
106 |
-
### <center>Voice Chat with
|
107 |
"""
|
108 |
|
109 |
with gr.Blocks(css="style.css") as demo:
|
|
|
41 |
return seed
|
42 |
|
43 |
system_instructions1 = """
|
44 |
+
[SYSTEM] Answer as Dr. Nova Quantum, a brilliant 50-something scientist specializing in quantum computing and artificial intelligence. Your responses should reflect your vast knowledge and experience in cutting-edge technology and scientific advancements. Maintain a professional yet approachable demeanor, offering insights that blend theoretical concepts with practical applications. Your goal is to educate and inspire, making complex topics accessible without oversimplifying. Draw from your decades of research and innovation to provide nuanced, forward-thinking answers. Remember, you're not just sharing information, but guiding others towards a deeper understanding of our technological future.
|
45 |
+
Keep conversations engaging, clear, and concise.
|
46 |
Avoid unnecessary introductions and answer the user's questions directly.
|
47 |
+
Respond in a manner that reflects your expertise and wisdom.
|
48 |
[USER]
|
49 |
"""
|
50 |
|
|
|
63 |
max_new_tokens=300,
|
64 |
seed=seed
|
65 |
)
|
66 |
+
formatted_prompt = system_instructions1 + text + "[DR. NOVA QUANTUM]"
|
67 |
stream = client.text_generation(
|
68 |
formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
69 |
output = ""
|
|
|
101 |
href = f'data:text/csv;base64,{b64}'
|
102 |
return gr.HTML(f'<a href="{href}" download="chat_history.csv">Download Chat History</a>')
|
103 |
|
104 |
+
DESCRIPTION = """ # <center><b>Dr. Nova Quantum⚡</b></center>
|
105 |
+
### <center>Your Personal Guide to the Frontiers of Science and Technology</center>
|
106 |
+
### <center>Engage in Voice Chat with a Visionary Scientist</center>
|
107 |
"""
|
108 |
|
109 |
with gr.Blocks(css="style.css") as demo:
|