Lookimi commited on
Commit
ef75301
1 Parent(s): f7e6fdd

Update ChatGPT_app.py

Browse files
Files changed (1) hide show
  1. ChatGPT_app.py +15 -1
ChatGPT_app.py CHANGED
@@ -36,4 +36,18 @@ demo = gr.Interface(
36
  gr.Interface(title="History", fn=lambda: responses, inputs=None, outputs=responses, live=False).launch(share=True)
37
 
38
  # Launch interface
39
- demo.launch(share=true)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  gr.Interface(title="History", fn=lambda: responses, inputs=None, outputs=responses, live=False).launch(share=True)
37
 
38
  # Launch interface
39
+ demo.launch(share=true)
40
+ Check this code to make sure it'll run:
41
+ chat_history = [
42
+ ["User", prompt],
43
+ ["OpenAI", response["choices"][0]["text"]]
44
+ ]
45
+
46
+
47
+ # Create the radio blocks window
48
+ window = RadioBlocks(chat_history)
49
+ window.mainloop()
50
+ # Print out the chat history
51
+ print("Chat History:")
52
+ for message in chat_history:
53
+ print(f"{message[0]}: {message[1]}")