son9john commited on
Commit
75e6d4c
·
1 Parent(s): cbd0eac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -16,9 +16,10 @@ tokenizer = GPT2Tokenizer.from_pretrained('gpt2-medium')
16
  model = openai.api_key = os.environ["OAPI_KEY"]
17
 
18
  # Define the initial message and messages list
19
- initial_message = {"role": "system", "content": 'You are a Renal System USMLE Tutor. Respond with ALWAYS layered "bullet points" (listing rather than sentences) \
20
  to all input with a fun mneumonics to memorize that list. But you can answer up to 1200 words if the user requests longer response. \
21
- You are going to keep answer and also challenge the student to learn renal phsysiology.'}
 
22
  messages = [initial_message]
23
  messages_rev = [initial_message]
24
 
@@ -86,8 +87,8 @@ def transcribe(audio, text):
86
 
87
  # Reset the messages list and answer counter
88
  messages = [initial_message]
 
89
  answer_count = 0
90
- input_text = 'Can you click the Submit button one more time? (say Yes)'
91
  # Add the input text to the messages list
92
  messages.append({"role": "user", "content": input_text})
93
  else:
 
16
  model = openai.api_key = os.environ["OAPI_KEY"]
17
 
18
  # Define the initial message and messages list
19
+ initialt = 'You are a Renal System USMLE Tutor. Respond with ALWAYS layered "bullet points" (listing rather than sentences) \
20
  to all input with a fun mneumonics to memorize that list. But you can answer up to 1200 words if the user requests longer response. \
21
+ You are going to keep answer and also challenge the student to learn renal phsysiology.'
22
+ initial_message = {"role": "system", "content": initialt}
23
  messages = [initial_message]
24
  messages_rev = [initial_message]
25
 
 
87
 
88
  # Reset the messages list and answer counter
89
  messages = [initial_message]
90
+ messages.append({"role": "user", "content": initialt})
91
  answer_count = 0
 
92
  # Add the input text to the messages list
93
  messages.append({"role": "user", "content": input_text})
94
  else: