Spaces:
Runtime error
Runtime error
Commit
·
3425021
1
Parent(s):
8615b96
Add application file
Browse files
app.py
CHANGED
@@ -8,10 +8,10 @@ from langchain.prompts import PromptTemplate
|
|
8 |
def process(api, caption, category, asr, ocr):
|
9 |
openai.api_key = api
|
10 |
preference = "兴趣标签"
|
11 |
-
example = "例如,给定一个视频,它的\"标题\"为\"长安系最便宜的轿车,4W
|
12 |
-
"类别\"为\"汽车\",\"ocr\"为\"长安系最便宜的一款轿车\",\"asr\"为\"
|
13 |
-
"
|
14 |
-
"
|
15 |
|
16 |
prompt = PromptTemplate(
|
17 |
input_variables=["preference", "caption", "ocr", "asr", "category", "example"],
|
|
|
8 |
def process(api, caption, category, asr, ocr):
|
9 |
openai.api_key = api
|
10 |
preference = "兴趣标签"
|
11 |
+
example = "例如,给定一个视频,它的\"标题\"为\"长安系最便宜的轿车,4W起很多人都看不上它,但我知道车只是代步工具,又需要什么面子呢" \
|
12 |
+
"!\",\"类别\"为\"汽车\",\"ocr\"为\"长安系最便宜的一款轿车\",\"asr\"为\"我不否认现在的国产和合资还有一定的差距," \
|
13 |
+
"但确实是他们让我们5万开了MP V8万开上了轿车,10万开张了ICV15万开张了大七座。\",{}生成机器人推断出合理的\"{}\"为\"长" \
|
14 |
+
"安轿车报价、最便宜的长安轿车、新款长安轿车\"。".format(preference, preference)
|
15 |
|
16 |
prompt = PromptTemplate(
|
17 |
input_variables=["preference", "caption", "ocr", "asr", "category", "example"],
|