Spaces:
Sleeping
Sleeping
Commit
·
0fde1d4
1
Parent(s):
c6a6b0b
test title,description,examples
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import gradio as gr # type: ignore
|
|
3 |
import openai # type: ignore
|
4 |
import os
|
5 |
|
6 |
-
openai.api_key = os.getenv("OPENAI_API_KEY")
|
7 |
client = openai.OpenAI()
|
8 |
def respond(
|
9 |
message,
|
@@ -57,11 +57,7 @@ chat = gr.ChatInterface(
|
|
57 |
gr.Image(type="pil", label="Attach an image (optional)"),
|
58 |
gr.File(label="Upload a file (optional)"),
|
59 |
],
|
60 |
-
|
61 |
-
["Xin chào!", "Bạn là trợ lý thân thiện.", 256, 0.5, 0.9],
|
62 |
-
["Tóm tắt đoạn văn sau…", "Bạn là một chuyên gia ngôn ngữ.", 512, 0.3, 0.95],
|
63 |
-
["Viết thơ 4 câu về hoa sen", "Bạn là một nhà thơ.", 128, 1.0, 0.8],
|
64 |
-
]
|
65 |
)
|
66 |
|
67 |
if __name__ == "__main__":
|
|
|
3 |
import openai # type: ignore
|
4 |
import os
|
5 |
|
6 |
+
# openai.api_key = os.getenv("OPENAI_API_KEY")
|
7 |
client = openai.OpenAI()
|
8 |
def respond(
|
9 |
message,
|
|
|
57 |
gr.Image(type="pil", label="Attach an image (optional)"),
|
58 |
gr.File(label="Upload a file (optional)"),
|
59 |
],
|
60 |
+
|
|
|
|
|
|
|
|
|
61 |
)
|
62 |
|
63 |
if __name__ == "__main__":
|