thejas-gida commited on
Commit
9a48c28
·
1 Parent(s): d55cfd0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -39,13 +39,15 @@ tools = [
39
  return_direct=True
40
  ),]
41
 
 
42
  conversational_memory = ConversationBufferWindowMemory( memory_key='chat_history', k=5, return_messages=True )
43
- llm = OpenAI(temperature=0.3, model_name="text-davinci-003")
44
 
45
  agent_executor = initialize_agent(tools, llm, agent="conversational-react-description", memory=conversational_memory,agent_kwargs={'prefix':PREFIX,'suffix': SUFFIX})
46
 
 
47
  def greet(Question):
48
- return agent_executor.run(input=Question)
49
 
50
  demo = gr.Interface(greet, gr.Textbox(lines=2, label="Question",placeholder="What do you want to know...?",outputs="text",title="Here Auto",description="Know everything about Cars and Bikes"),["html"])
51
 
 
39
  return_direct=True
40
  ),]
41
 
42
+ num_outputs = 2000
43
  conversational_memory = ConversationBufferWindowMemory( memory_key='chat_history', k=5, return_messages=True )
44
+ llm = OpenAI(temperature=0.3, model_name="text-davinci-003",max_tokens=num_outputs)
45
 
46
  agent_executor = initialize_agent(tools, llm, agent="conversational-react-description", memory=conversational_memory,agent_kwargs={'prefix':PREFIX,'suffix': SUFFIX})
47
 
48
+ add = "Return the output in a table format or an ordered list legible to the user.\n"
49
  def greet(Question):
50
+ return agent_executor.run(input=add+Question)
51
 
52
  demo = gr.Interface(greet, gr.Textbox(lines=2, label="Question",placeholder="What do you want to know...?",outputs="text",title="Here Auto",description="Know everything about Cars and Bikes"),["html"])
53