Spaces:
				
			
			
	
			
			
		Runtime error
		
	
	
	
			
			
	
	
	
	
		
		
		Runtime error
		
	| import openai | |
| import gradio as gr | |
| import uuid | |
| import os | |
| from gpt_model import * | |
| openai.api_key = os.environ.get('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') | |
| gpt = GPT_Model(append_output_prefix_to_query=True) | |
| gpt.add_example(Example('hi','Hello, how are you?')) | |
| gpt.add_example(Example('What is Neo Ivy Capital','The Neo Ivy Capital Fund is a quantitative hedge fund that invests in liquid, publicly traded equity securities via artificial intelligence strategies.')) | |
| gpt.add_example(Example('Who is the CEO of Neo Ivy Capital','The CEO of Neo Ivy Capital is Renee Yao')) | |
| def chatbot(input, history=[]): | |
| output = gpt.submit_request(input) | |
| history.append((input, output)) | |
| return history, history | |
| gr.Interface(fn = chatbot, | |
| inputs = ["text",'state'], | |
| outputs = ["chatbot",'state']).launch() |