Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,9 @@ import time
|
|
| 4 |
import os
|
| 5 |
|
| 6 |
openai_secret_key = os.environ.get('OPENAI_SECRET_KEY')
|
| 7 |
-
|
|
|
|
|
|
|
| 8 |
|
| 9 |
with gr.Blocks() as demo:
|
| 10 |
chatbot = gr.Chatbot()
|
|
@@ -15,7 +17,7 @@ with gr.Blocks() as demo:
|
|
| 15 |
return "", history + [[user_message, None]]
|
| 16 |
|
| 17 |
def bot(history):
|
| 18 |
-
bot_message = random.choice(["Yes",
|
| 19 |
history[-1][1] = bot_message
|
| 20 |
time.sleep(1)
|
| 21 |
return history
|
|
|
|
| 4 |
import os
|
| 5 |
|
| 6 |
openai_secret_key = os.environ.get('OPENAI_SECRET_KEY')
|
| 7 |
+
with open("./Whisper AI/Weldon_Note_Format.txt", "r") as f:
|
| 8 |
+
role = f.read()
|
| 9 |
+
role_head = role[1:50]
|
| 10 |
|
| 11 |
with gr.Blocks() as demo:
|
| 12 |
chatbot = gr.Chatbot()
|
|
|
|
| 17 |
return "", history + [[user_message, None]]
|
| 18 |
|
| 19 |
def bot(history):
|
| 20 |
+
bot_message = random.choice(["Yes", role_head])
|
| 21 |
history[-1][1] = bot_message
|
| 22 |
time.sleep(1)
|
| 23 |
return history
|