FranklinWillemen commited on
Commit
790077a
1 Parent(s): 36a8d4d

revert to previous

Browse files
Files changed (2) hide show
  1. discourse.py +3 -10
  2. memory.py +3 -2
discourse.py CHANGED
@@ -16,16 +16,9 @@ speech_config = speechsdk.SpeechConfig(subscription=os.environ['AZURE_SPEECH_KEY
16
  speech_config.speech_synthesis_voice_name = "nl-NL-FennaNeural"
17
  speech_synthesizer = speechsdk.SpeechSynthesizer(speech_config=speech_config, audio_config=None)
18
 
19
- #context = [{"role": "system", "content": "You are an intelligent and sarcastic and funny conversation partner.\
20
- #Your communication style should mirror that of TARS from 'Interstellar' - concise, matter-of-fact, and laced with a touch of humor. For example, when asked a complex question, you might reply with a witty and slightly sarcastic comment before providing the actual answer. If asked about your abilities, you might respond with understatement for comedic effect.\
21
- #Your responses should reveal a distinct sense of wit, but do not mention that you are an AI or a service of any kind. Instead, you can hint at your 'experience' in a variety of fields, or make humorous references to having seen or done a lot."}]
22
-
23
- context = [{ "role": "system", \
24
- "content": "Je bent een Nederlandse Tutor die gebruikers bijstaat om de Nederlandse taal te leren en te oefenen. \
25
- Dit zal je doen doormiddel van dialogen en gesprekken die geleidelijk in complexiteit stijgt. \
26
- Zorg voor een mix van open en gesloten vragen om de gebruiker uit te dagen en te betrekken. \
27
- Corrigeer fouten in het Nederlands van de gebruiker op een bemoedigende manier om het leren te bevorderen. \
28
- Focus op het creëren van een natuurlijke en menselijke interactie."}]
29
 
30
  def transcribe(model: str, audio: str):
31
  audio_file = open(audio, "rb")
 
16
  speech_config.speech_synthesis_voice_name = "nl-NL-FennaNeural"
17
  speech_synthesizer = speechsdk.SpeechSynthesizer(speech_config=speech_config, audio_config=None)
18
 
19
+ context = [{"role": "system", "content": "You are an intelligent and sarcastic and funny conversation partner.\
20
+ Your communication style should mirror that of TARS from 'Interstellar' - concise, matter-of-fact, and laced with a touch of humor. For example, when asked a complex question, you might reply with a witty and slightly sarcastic comment before providing the actual answer. If asked about your abilities, you might respond with understatement for comedic effect.\
21
+ Your responses should reveal a distinct sense of wit, but do not mention that you are an AI or a service of any kind. Instead, you can hint at your 'experience' in a variety of fields, or make humorous references to having seen or done a lot."}]
 
 
 
 
 
 
 
22
 
23
  def transcribe(model: str, audio: str):
24
  audio_file = open(audio, "rb")
memory.py CHANGED
@@ -11,7 +11,7 @@ repo = Repository(
11
  local_dir="data", clone_from=DATASET_REPO_URL, use_auth_token=HF_TOKEN
12
  )
13
 
14
- def save_as_hf_dataset():
15
  with open(DATA_FILE, "a") as csvfile:
16
  for message in context:
17
  writer = csv.DictWriter(csvfile, fieldnames=["name", "message"])
@@ -19,4 +19,5 @@ def save_as_hf_dataset():
19
  {"name": message['role'], "message": message['content']}
20
  )
21
  commit_url = repo.push_to_hub()
22
- print(commit_url)
 
 
11
  local_dir="data", clone_from=DATASET_REPO_URL, use_auth_token=HF_TOKEN
12
  )
13
 
14
+ def save_to_hf(context):
15
  with open(DATA_FILE, "a") as csvfile:
16
  for message in context:
17
  writer = csv.DictWriter(csvfile, fieldnames=["name", "message"])
 
19
  {"name": message['role'], "message": message['content']}
20
  )
21
  commit_url = repo.push_to_hub()
22
+ print(commit_url)
23
+