Spaces:
Runtime error
Runtime error
Commit
·
94639bb
1
Parent(s):
6c7d02a
Update main.py
Browse files
main.py
CHANGED
|
@@ -47,7 +47,13 @@ llm_chain = LLMChain(llm=llm, prompt=PromptTemplate.from_template(prompt_templat
|
|
| 47 |
|
| 48 |
# 定义API端点
|
| 49 |
app = Flask(__name__)
|
| 50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
@app.route('/api/chat', methods=['POST'])
|
| 52 |
def chat():
|
| 53 |
#async def chat():
|
|
|
|
| 47 |
|
| 48 |
# 定义API端点
|
| 49 |
app = Flask(__name__)
|
| 50 |
+
@app.route('/', methods=['POST'])
|
| 51 |
+
def home_api():
|
| 52 |
+
data = request.get_json()
|
| 53 |
+
user_query = data['user_question']
|
| 54 |
+
print(user_query)
|
| 55 |
+
return {"Hey":"Flask Home API Deploy Success on HF"}
|
| 56 |
+
|
| 57 |
@app.route('/api/chat', methods=['POST'])
|
| 58 |
def chat():
|
| 59 |
#async def chat():
|