Spaces:
Sleeping
Sleeping
Update test.py
Browse files
test.py
CHANGED
@@ -1,7 +1,8 @@
|
|
1 |
import openai
|
2 |
import gradio as gr
|
|
|
3 |
|
4 |
-
openai.api_key = "
|
5 |
|
6 |
messages = [
|
7 |
{"role": "system", "content": "You are a learning assistant specialized in business information systems."},
|
@@ -22,6 +23,6 @@ outputs = gr.outputs.Textbox(label="Reply")
|
|
22 |
|
23 |
gr.Interface(fn=chatbot, inputs=inputs, outputs=outputs, title="Virtual TA",
|
24 |
description="This is a prototype of learning assistant designed for MIS 320 online section.",
|
25 |
-
theme="compact").launch(
|
26 |
|
27 |
-
|
|
|
1 |
import openai
|
2 |
import gradio as gr
|
3 |
+
import os
|
4 |
|
5 |
+
openai.api_key = os.getenv("OPENAI_API_KEY")
|
6 |
|
7 |
messages = [
|
8 |
{"role": "system", "content": "You are a learning assistant specialized in business information systems."},
|
|
|
23 |
|
24 |
gr.Interface(fn=chatbot, inputs=inputs, outputs=outputs, title="Virtual TA",
|
25 |
description="This is a prototype of learning assistant designed for MIS 320 online section.",
|
26 |
+
theme="compact").launch(inline=True)
|
27 |
|
28 |
+
|