Spaces:
Runtime error
Runtime error
Speed up
Browse files- app.py +1 -0
- config.json +2 -2
app.py
CHANGED
@@ -88,6 +88,7 @@ def find_answers(tags: str, questions: str, progress=gr.Progress()) -> str:
|
|
88 |
|
89 |
results = []
|
90 |
for question in progress.tqdm(questions):
|
|
|
91 |
tagged_question = f'{tags_str} {question}'
|
92 |
for attempt in range(max_attempts):
|
93 |
answer = get_answer(tagged_question)
|
|
|
88 |
|
89 |
results = []
|
90 |
for question in progress.tqdm(questions):
|
91 |
+
time.sleep(wait_time)
|
92 |
tagged_question = f'{tags_str} {question}'
|
93 |
for attempt in range(max_attempts):
|
94 |
answer = get_answer(tagged_question)
|
config.json
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
{
|
2 |
"MAX_QUESTIONS_COUNT": 10,
|
3 |
"MAX_TAGS_COUNT": 5,
|
4 |
-
"MAX_ATTEMPS":
|
5 |
-
"WAIT_TIME":
|
6 |
"CHATGPT_URL": "https://free.churchless.tech/v1/chat/completions",
|
7 |
"SYSTEM_PROMPT": "Your task is to give the most detailed answer to the question posed. At the beginning of the question, there are tags in square brackets specifying the subject of the question. It is necessary to answer in the language of the user's question"
|
8 |
}
|
|
|
1 |
{
|
2 |
"MAX_QUESTIONS_COUNT": 10,
|
3 |
"MAX_TAGS_COUNT": 5,
|
4 |
+
"MAX_ATTEMPS": 1,
|
5 |
+
"WAIT_TIME": 1,
|
6 |
"CHATGPT_URL": "https://free.churchless.tech/v1/chat/completions",
|
7 |
"SYSTEM_PROMPT": "Your task is to give the most detailed answer to the question posed. At the beginning of the question, there are tags in square brackets specifying the subject of the question. It is necessary to answer in the language of the user's question"
|
8 |
}
|