zhaokeyao1
commited on
Commit
·
204c5db
1
Parent(s):
409101c
Update name
Browse files
app.py
CHANGED
|
@@ -153,7 +153,7 @@ client=OpenAI(
|
|
| 153 |
api_key=os.environ.get("TONGYI_API_KEY"), # �滻����ʵDashScope��API_KEY
|
| 154 |
base_url="https://dashscope.aliyuncs.com/compatible-mode/v1", # ��дDashScopebase_url
|
| 155 |
)
|
| 156 |
-
def
|
| 157 |
if password_input != os.environ.get("USER_KEY"):
|
| 158 |
return [(None, "Wrong password!")], conversation, user_input
|
| 159 |
file = client.files.create(file=Path(user_in_file), purpose="file-extract")
|
|
@@ -182,7 +182,7 @@ def predict_(password_input, user_in_file):
|
|
| 182 |
history += chunk.choices[0].delta.content
|
| 183 |
time.sleep(0.05)
|
| 184 |
yield history
|
| 185 |
-
def
|
| 186 |
if password_input != os.environ.get("USER_KEY"):
|
| 187 |
return [(None, "Wrong password!")], conversation, user_input
|
| 188 |
file = client.files.create(file=Path(user_in_file), purpose="file-extract")
|
|
@@ -211,7 +211,7 @@ def predict_(password_input, user_in_file):
|
|
| 211 |
history += chunk.choices[0].delta.content
|
| 212 |
time.sleep(0.05)
|
| 213 |
yield history
|
| 214 |
-
def
|
| 215 |
if password_input != os.environ.get("USER_KEY"):
|
| 216 |
return [(None, "Wrong password!")], conversation, user_input
|
| 217 |
file = client.files.create(file=Path(user_in_file), purpose="file-extract")
|
|
@@ -240,7 +240,7 @@ def predict_(password_input, user_in_file):
|
|
| 240 |
history += chunk.choices[0].delta.content
|
| 241 |
time.sleep(0.05)
|
| 242 |
yield history
|
| 243 |
-
def
|
| 244 |
if password_input != os.environ.get("USER_KEY"):
|
| 245 |
return [(None, "Wrong password!")], conversation, user_input
|
| 246 |
file = client.files.create(file=Path(user_in_file), purpose="file-extract")
|
|
@@ -269,7 +269,7 @@ def predict_(password_input, user_in_file):
|
|
| 269 |
history += chunk.choices[0].delta.content
|
| 270 |
time.sleep(0.05)
|
| 271 |
yield history
|
| 272 |
-
def
|
| 273 |
if password_input != os.environ.get("USER_KEY"):
|
| 274 |
return [(None, "Wrong password!")], conversation, user_input
|
| 275 |
file = client.files.create(file=Path(user_in_file), purpose="file-extract")
|
|
@@ -298,7 +298,7 @@ def predict_(password_input, user_in_file):
|
|
| 298 |
history += chunk.choices[0].delta.content
|
| 299 |
time.sleep(0.05)
|
| 300 |
yield history
|
| 301 |
-
def
|
| 302 |
if password_input != os.environ.get("USER_KEY"):
|
| 303 |
return [(None, "Wrong password!")], conversation, user_input
|
| 304 |
file = client.files.create(file=Path(user_in_file), purpose="file-extract")
|
|
@@ -328,7 +328,7 @@ def predict_(password_input, user_in_file):
|
|
| 328 |
time.sleep(0.05)
|
| 329 |
yield history
|
| 330 |
|
| 331 |
-
def
|
| 332 |
if password_input != os.environ.get("USER_KEY"):
|
| 333 |
return [(None, "Wrong password!")], conversation, user_input
|
| 334 |
file = client.files.create(file=Path(user_in_file), purpose="file-extract")
|
|
|
|
| 153 |
api_key=os.environ.get("TONGYI_API_KEY"), # �滻����ʵDashScope��API_KEY
|
| 154 |
base_url="https://dashscope.aliyuncs.com/compatible-mode/v1", # ��дDashScopebase_url
|
| 155 |
)
|
| 156 |
+
def predict_issue(password_input, user_in_file):
|
| 157 |
if password_input != os.environ.get("USER_KEY"):
|
| 158 |
return [(None, "Wrong password!")], conversation, user_input
|
| 159 |
file = client.files.create(file=Path(user_in_file), purpose="file-extract")
|
|
|
|
| 182 |
history += chunk.choices[0].delta.content
|
| 183 |
time.sleep(0.05)
|
| 184 |
yield history
|
| 185 |
+
def predict_mindmap(password_input, user_in_file):
|
| 186 |
if password_input != os.environ.get("USER_KEY"):
|
| 187 |
return [(None, "Wrong password!")], conversation, user_input
|
| 188 |
file = client.files.create(file=Path(user_in_file), purpose="file-extract")
|
|
|
|
| 211 |
history += chunk.choices[0].delta.content
|
| 212 |
time.sleep(0.05)
|
| 213 |
yield history
|
| 214 |
+
def predict_keywords(password_input, user_in_file):
|
| 215 |
if password_input != os.environ.get("USER_KEY"):
|
| 216 |
return [(None, "Wrong password!")], conversation, user_input
|
| 217 |
file = client.files.create(file=Path(user_in_file), purpose="file-extract")
|
|
|
|
| 240 |
history += chunk.choices[0].delta.content
|
| 241 |
time.sleep(0.05)
|
| 242 |
yield history
|
| 243 |
+
def predict_dynamics(password_input, user_in_file):
|
| 244 |
if password_input != os.environ.get("USER_KEY"):
|
| 245 |
return [(None, "Wrong password!")], conversation, user_input
|
| 246 |
file = client.files.create(file=Path(user_in_file), purpose="file-extract")
|
|
|
|
| 269 |
history += chunk.choices[0].delta.content
|
| 270 |
time.sleep(0.05)
|
| 271 |
yield history
|
| 272 |
+
def predict_complaint(password_input, user_in_file):
|
| 273 |
if password_input != os.environ.get("USER_KEY"):
|
| 274 |
return [(None, "Wrong password!")], conversation, user_input
|
| 275 |
file = client.files.create(file=Path(user_in_file), purpose="file-extract")
|
|
|
|
| 298 |
history += chunk.choices[0].delta.content
|
| 299 |
time.sleep(0.05)
|
| 300 |
yield history
|
| 301 |
+
def predict_concept(password_input, user_in_file):
|
| 302 |
if password_input != os.environ.get("USER_KEY"):
|
| 303 |
return [(None, "Wrong password!")], conversation, user_input
|
| 304 |
file = client.files.create(file=Path(user_in_file), purpose="file-extract")
|
|
|
|
| 328 |
time.sleep(0.05)
|
| 329 |
yield history
|
| 330 |
|
| 331 |
+
def predict_plan(password_input, user_in_file):
|
| 332 |
if password_input != os.environ.get("USER_KEY"):
|
| 333 |
return [(None, "Wrong password!")], conversation, user_input
|
| 334 |
file = client.files.create(file=Path(user_in_file), purpose="file-extract")
|