xavierbarbier commited on
Commit
a925a65
·
verified ·
1 Parent(s): 7f156c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -78,7 +78,7 @@ index.add(text_embeddings)
78
 
79
  print("Finish the model init process")
80
 
81
- def qa(question: str, doc: str) -> str:
82
 
83
 
84
 
@@ -97,13 +97,14 @@ def qa(question: str, doc: str) -> str:
97
  [INST] Requête: {question} [/INST]
98
  Réponse:
99
  """
100
- #outputs = model.generate(prompt=prompt, temp=0.5, top_k = 40, top_p = 1, max_tokens = max_new_tokens)
101
- return prompt #"".join(outputs)
102
 
103
 
104
  demo = gr.Interface(
105
  qa,
106
- [gr.Textbox(label="Question"), PDF(label="Document")],
 
107
  gr.Textbox()
108
  )
109
  if __name__ == "__main__":
 
78
 
79
  print("Finish the model init process")
80
 
81
+ def qa(question: str) -> str:
82
 
83
 
84
 
 
97
  [INST] Requête: {question} [/INST]
98
  Réponse:
99
  """
100
+ outputs = model.generate(prompt=prompt, temp=0.5, top_k = 40, top_p = 1, max_tokens = max_new_tokens)
101
+ return prompt "".join(outputs)
102
 
103
 
104
  demo = gr.Interface(
105
  qa,
106
+ [gr.Textbox(label="Question")#, PDF(label="Document")
107
+ ],
108
  gr.Textbox()
109
  )
110
  if __name__ == "__main__":