not-lain commited on
Commit
8577be5
β€’
1 Parent(s): 89b12a6

🌘wπŸŒ–

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -42,7 +42,7 @@ def search(query: str, k: int = TOP_K):
42
 
43
  def prepare_prompt(query, retrieved_examples):
44
  prompt = (
45
- f"Query: {query}\nContinue to answer the query by using the Search Results:\n"
46
  )
47
  urls = []
48
  titles = retrieved_examples["title"][::-1]
@@ -107,7 +107,7 @@ def talk(message, history):
107
  partial_text += new_text
108
  yield partial_text
109
  except Exception as e:
110
- print(f"retry number {i}\ LOGS:\n")
111
  i+=1
112
  print(e, e.args)
113
  partial_text += resources
@@ -141,7 +141,7 @@ demo = gr.ChatInterface(
141
  bubble_full_width=False,
142
  ),
143
  theme="Soft",
144
- examples=[["what is machine learning"]],
145
  title=TITLE,
146
  description=DESCRIPTION,
147
  )
 
42
 
43
  def prepare_prompt(query, retrieved_examples):
44
  prompt = (
45
+ f"Query: {query}\nContinue to answer the query in short sentences by using the Search Results:\n"
46
  )
47
  urls = []
48
  titles = retrieved_examples["title"][::-1]
 
107
  partial_text += new_text
108
  yield partial_text
109
  except Exception as e:
110
+ print(f"retry number {i}\n LOGS:\n")
111
  i+=1
112
  print(e, e.args)
113
  partial_text += resources
 
141
  bubble_full_width=False,
142
  ),
143
  theme="Soft",
144
+ examples=[["what's anarchy ?"]],
145
  title=TITLE,
146
  description=DESCRIPTION,
147
  )