HarshanaLF commited on
Commit
9665df1
1 Parent(s): 9b9deec
Files changed (2) hide show
  1. README.md +1 -1
  2. app.py +10 -8
README.md CHANGED
@@ -10,7 +10,7 @@ pinned: false
10
  short_description: Voice Chat with JULIA
11
  ---
12
 
13
- # JARVIS
14
 
15
  A personal assistant inspired by Tony Stark's JARVIS, built using Gradio, edge_tts, Hugging Face Inference API, and streaming STT (Speech-to-Text) with Nemo.
16
 
 
10
  short_description: Voice Chat with JULIA
11
  ---
12
 
13
+ # JULIA
14
 
15
  A personal assistant inspired by Tony Stark's JARVIS, built using Gradio, edge_tts, Hugging Face Inference API, and streaming STT (Speech-to-Text) with Nemo.
16
 
app.py CHANGED
@@ -50,13 +50,15 @@ def randomize_seed_fn(seed: int) -> int:
50
  return seed
51
 
52
  # System instructions for the virtual assistant
53
- system_instructions1 = """
54
- [SYSTEM] Answer as virtual assistant named Julia, made by 'Harshana Lakshara.'
55
- Keep the conversation friendly, short, clear, and concise.
56
- Avoid unnecessary introductions and answer the user's questions directly.
57
- Respond in a normal, conversational manner while being friendly and helpful.
58
- [USER]
59
- """
 
 
60
 
61
  def models(text, model="Mixtral 8x7B", seed=42):
62
  """
@@ -71,7 +73,7 @@ def models(text, model="Mixtral 8x7B", seed=42):
71
  max_new_tokens=300,
72
  seed=seed
73
  )
74
- formatted_prompt = system_instructions1 + text + "[JARVIS]"
75
  stream = client.text_generation(
76
  formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
77
  output = ""
 
50
  return seed
51
 
52
  # System instructions for the virtual assistant
53
+ system_instructions = ("[SYSTEM] You are a virtual assistant named Julia, made by 'Harshana Lakshara.'"
54
+ "Your task is to Answer the question."
55
+ "Keep conversation very short, clear and concise."
56
+ "Respond naturally and concisely to the user's queries. "
57
+ "Respond in a normal, conversational manner while being friendly and helpful."
58
+ "The expectation is that you will avoid introductions and start answering the query directly, Only answer the question asked by user, Do not say unnecessary things."
59
+ "Begin with a greeting if the user initiates the conversation. "
60
+ "Avoid unnecessary introductions and answer the user's questions directly."
61
+ "Here is the user's query:[QUESTION] ")
62
 
63
  def models(text, model="Mixtral 8x7B", seed=42):
64
  """
 
73
  max_new_tokens=300,
74
  seed=seed
75
  )
76
+ formatted_prompt = system_instructions + text + "[JARVIS]"
77
  stream = client.text_generation(
78
  formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
79
  output = ""