Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -35,18 +35,6 @@ def query_llm(question):
|
|
35 |
answer = response.split("Answer:", 1)[-1].strip()
|
36 |
|
37 |
return answer
|
38 |
-
hotel_assistant_prompt_template = PromptTemplate(
|
39 |
-
input_variables=["question"],
|
40 |
-
template=hotel_assistant_template
|
41 |
-
)
|
42 |
-
|
43 |
-
llm = OpenAI(model='gpt-3.5-turbo-instruct', temperature=0)
|
44 |
-
|
45 |
-
llm_chain = hotel_assistant_prompt_template | llm
|
46 |
-
|
47 |
-
def query_llm(question):
|
48 |
-
response = llm_chain.invoke({'question': question})
|
49 |
-
return response
|
50 |
|
51 |
app = Flask(__name__)
|
52 |
|
|
|
35 |
answer = response.split("Answer:", 1)[-1].strip()
|
36 |
|
37 |
return answer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
app = Flask(__name__)
|
40 |
|