magehunter45 commited on
Commit
e46beda
·
1 Parent(s): 1edd768

Adding mandarin capabilities

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -72,7 +72,7 @@ def infer(question, history):
72
 
73
  chat_history = res
74
  #print(chat_history)
75
- query = question
76
  result = qa({"question": query, "chat_history": chat_history})
77
  #print(result)
78
  return result["answer"]
@@ -108,7 +108,7 @@ with gr.Blocks(css=css) as demo:
108
  #pdf_doc = gr.File(label="Upload PDF", file_types=['.pdf'], type="file")
109
  with gr.Row():
110
  langchain_status = gr.Textbox(label="Status", placeholder="", interactive=False)
111
- load_pdf = gr.Button("Click to Load Langchain")
112
 
113
  chatbot = gr.Chatbot([], elem_id="chatbot").style(height=350)
114
  question = gr.Textbox(label="Question", placeholder="Type your question")
 
72
 
73
  chat_history = res
74
  #print(chat_history)
75
+ query = question + ". Please include a matching response to the question in simplified chinese"
76
  result = qa({"question": query, "chat_history": chat_history})
77
  #print(result)
78
  return result["answer"]
 
108
  #pdf_doc = gr.File(label="Upload PDF", file_types=['.pdf'], type="file")
109
  with gr.Row():
110
  langchain_status = gr.Textbox(label="Status", placeholder="", interactive=False)
111
+ #load_pdf = gr.Button("Click to Load Langchain")
112
 
113
  chatbot = gr.Chatbot([], elem_id="chatbot").style(height=350)
114
  question = gr.Textbox(label="Question", placeholder="Type your question")