Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,6 @@ import os
|
|
2 |
import openai
|
3 |
import gradio as gr
|
4 |
|
5 |
-
# openai.api_key = "sk-" # Replace with your key
|
6 |
|
7 |
OPENAI_API_KEY=os.getenv('OPENAI_API_KEY')
|
8 |
USER=os.getenv('USER')
|
@@ -34,5 +33,5 @@ def predict(message, history):
|
|
34 |
gr.ChatInterface(predict,
|
35 |
textbox=gr.Textbox(placeholder="请输入您的问题", container=False, scale=7),
|
36 |
title="欢迎使用AI机器人",
|
37 |
-
examples=["你是谁?", "请用
|
38 |
-
description="
|
|
|
2 |
import openai
|
3 |
import gradio as gr
|
4 |
|
|
|
5 |
|
6 |
OPENAI_API_KEY=os.getenv('OPENAI_API_KEY')
|
7 |
USER=os.getenv('USER')
|
|
|
33 |
gr.ChatInterface(predict,
|
34 |
textbox=gr.Textbox(placeholder="请输入您的问题", container=False, scale=7),
|
35 |
title="欢迎使用AI机器人",
|
36 |
+
examples=["你是谁?", "请用python写一个希尔排序", "请用关于春天写一首100字的诗","数学题:小红有3元钱,小红买了2斤香蕉,香蕉的价格是每斤1元。问小红一共花了多少钱?","请用表格做一份学生课程表"],
|
37 |
+
description="🦊请避免输入有违公序良俗的问题,模型可能无法回答不合适的问题🐇",).queue().launch(auth=(USER, PASS))
|