Spaces:
Sleeping
Sleeping
update
Browse files
app.py
CHANGED
@@ -65,7 +65,7 @@ def getsummary_route():
|
|
65 |
summary_prompt = f'''<s>[INST]Ты ассистент. Отвечаешь на русском языке. Сформируй краткое изложение следующего текста: {text}[/INST]'''
|
66 |
response = generate(summary_prompt[:52000])
|
67 |
|
68 |
-
return
|
69 |
|
70 |
@app.route('/cleantext', methods=['POST'])
|
71 |
def cleantext_route():
|
@@ -75,7 +75,7 @@ def cleantext_route():
|
|
75 |
summary_prompt = f'''<s>[INST]Ты ассистент. Отвечаешь на русском языке. Сформируй краткое изложение следующего текста: {text}[/INST]'''
|
76 |
response = generate(summary_prompt[:52000])
|
77 |
|
78 |
-
return
|
79 |
|
80 |
@app.route('/getfollowup', methods=['POST'])
|
81 |
def getfollowup_route():
|
@@ -85,7 +85,7 @@ def getfollowup_route():
|
|
85 |
summary_prompt = f'''<s>[INST]Ты ассистент. Отвечаешь на русском языке. Сформируй краткое изложение следующего текста: {text}[/INST]'''
|
86 |
response = generate(summary_prompt[:52000])
|
87 |
|
88 |
-
return
|
89 |
|
90 |
@app.route('/getagenda', methods=['POST'])
|
91 |
def getagenda_route():
|
@@ -95,7 +95,7 @@ def getagenda_route():
|
|
95 |
summary_prompt = f'''<s>[INST]Ты ассистент. Отвечаешь на русском языке. Сформируй краткое изложение следующего текста: {text}[/INST]'''
|
96 |
response = generate(summary_prompt[:52000])
|
97 |
|
98 |
-
return
|
99 |
|
100 |
if __name__ == '__main__':
|
101 |
app.run(debug=False, host='0.0.0.0', port=7860)
|
|
|
65 |
summary_prompt = f'''<s>[INST]Ты ассистент. Отвечаешь на русском языке. Сформируй краткое изложение следующего текста: {text}[/INST]'''
|
66 |
response = generate(summary_prompt[:52000])
|
67 |
|
68 |
+
return jsonify({'result': response})
|
69 |
|
70 |
@app.route('/cleantext', methods=['POST'])
|
71 |
def cleantext_route():
|
|
|
75 |
summary_prompt = f'''<s>[INST]Ты ассистент. Отвечаешь на русском языке. Сформируй краткое изложение следующего текста: {text}[/INST]'''
|
76 |
response = generate(summary_prompt[:52000])
|
77 |
|
78 |
+
return jsonify({'result': response})
|
79 |
|
80 |
@app.route('/getfollowup', methods=['POST'])
|
81 |
def getfollowup_route():
|
|
|
85 |
summary_prompt = f'''<s>[INST]Ты ассистент. Отвечаешь на русском языке. Сформируй краткое изложение следующего текста: {text}[/INST]'''
|
86 |
response = generate(summary_prompt[:52000])
|
87 |
|
88 |
+
return jsonify({'result': response})
|
89 |
|
90 |
@app.route('/getagenda', methods=['POST'])
|
91 |
def getagenda_route():
|
|
|
95 |
summary_prompt = f'''<s>[INST]Ты ассистент. Отвечаешь на русском языке. Сформируй краткое изложение следующего текста: {text}[/INST]'''
|
96 |
response = generate(summary_prompt[:52000])
|
97 |
|
98 |
+
return jsonify({'result': response})
|
99 |
|
100 |
if __name__ == '__main__':
|
101 |
app.run(debug=False, host='0.0.0.0', port=7860)
|