sabazo commited on
Commit
b0cff56
1 Parent(s): b7575d3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -31
app.py CHANGED
@@ -42,37 +42,8 @@ def bot(history):
42
 
43
  def infer(question):
44
 
45
- #query = question
46
- #result = qa({"query": query})
47
- chat_template = ChatPromptTemplate.from_messages(
48
- [
49
- ("system", "You are a helpful Doc AI bot. Your name is {name}."),
50
- ("human", "Hello, how can I install RAY?"),
51
- ("ai", "To install Ray, you can use pip: \
52
- pip install ray Or, if you want to install a specific version of Ray, you can use: \
53
- \
54
- pip install -U 'ray[version]' \
55
- \
56
- Where [version] is the version you want to install. \
57
- If you are on Arch Linux, you can install Ray from the Arch User Repository (AUR) using an AUR helper like yay: \
58
- \
59
- yay -S python-ray \
60
- \
61
- You can also manually install the package by following the instructions on the Arch Wiki. \
62
- \
63
- Sources: \
64
- \
65
- https://docs.ray.io/en/master/ray-core/examples/gentle_walkthrough.html#install-ray \
66
- https://docs.ray.io/en/master/ray-more-libs/installation.html#installing-ray-on-arch-linux \
67
- https://docs.ray.io/en/master/ray-overview/installation.html#installing-ray-on-arch-linux \
68
- https://docs.ray.io/en/master/installation.html#installing-ray-on-arch-linux \
69
- https://docs.ray.io/en/master/installation.html#from-wheels"),
70
- ("human", "{user_input}"),
71
- ]
72
- )
73
-
74
- message = chat_template.format_messages(name="RAYDOC", user_input=question)
75
- result = qa({"query": message})
76
  return result
77
 
78
  css="""
 
42
 
43
  def infer(question):
44
 
45
+ query = question
46
+ result = qa({"query": query})
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  return result
48
 
49
  css="""