jozzy commited on
Commit
59c047e
1 Parent(s): 8c84cdf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -152,12 +152,12 @@ with gr.Blocks() as chatHistory:
152
  role = gr.Interface(fn=roleChoice, inputs="text", outputs="text", description = "Choose your GPT roles, e.g. You are a helpful technology assistant. 你是一位 IT 架构师。 你是一位开发者关系顾问。你是一位机器学习工程师。你是一位高级 C++ 开发人员 ")
153
  text = gr.Interface(fn=textGPT, inputs="text", outputs="text")
154
 
155
- pinecone = gr.Interface(fn=process_file, inputs=["text", gr.inputs.File(file_count="directory")], outputs="text")
156
 
157
  #audio = gr.Interface(fn=audioGPT, inputs=gr.Audio(source="microphone", type="filepath"), outputs="text")
158
  #siri = gr.Interface(fn=siriGPT, inputs=gr.Audio(source="microphone", type="filepath"), outputs = "audio")
159
  file = gr.Interface(fn=fileGPT, inputs=["text", "file"], outputs="text", description = "Enter prompt sentences and your PDF. e.g. lets think step by step, summarize this following text: 或者 让我们一步一步地思考,总结以下的内容:")
160
- demo = gr.TabbedInterface([role, text, file, chatHistory, pinecone], [ "roleChoice", "chatGPT", "fileGPT", "ChatHistory", "Pinecone"])
161
 
162
  if __name__ == "__main__":
163
  demo.launch(enable_queue=False, auth=lambda u, p: user_db.get(u) == p,
 
152
  role = gr.Interface(fn=roleChoice, inputs="text", outputs="text", description = "Choose your GPT roles, e.g. You are a helpful technology assistant. 你是一位 IT 架构师。 你是一位开发者关系顾问。你是一位机器学习工程师。你是一位高级 C++ 开发人员 ")
153
  text = gr.Interface(fn=textGPT, inputs="text", outputs="text")
154
 
155
+ vector_server = gr.Interface(fn=process_file, inputs=["text", gr.inputs.File(file_count="directory")], outputs="text")
156
 
157
  #audio = gr.Interface(fn=audioGPT, inputs=gr.Audio(source="microphone", type="filepath"), outputs="text")
158
  #siri = gr.Interface(fn=siriGPT, inputs=gr.Audio(source="microphone", type="filepath"), outputs = "audio")
159
  file = gr.Interface(fn=fileGPT, inputs=["text", "file"], outputs="text", description = "Enter prompt sentences and your PDF. e.g. lets think step by step, summarize this following text: 或者 让我们一步一步地思考,总结以下的内容:")
160
+ demo = gr.TabbedInterface([role, text, file, chatHistory, vector_server], [ "roleChoice", "chatGPT", "fileGPT", "ChatHistory", "VectorServer"])
161
 
162
  if __name__ == "__main__":
163
  demo.launch(enable_queue=False, auth=lambda u, p: user_db.get(u) == p,