Lookimi commited on
Commit
70c0b7f
1 Parent(s): 857aae9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py CHANGED
@@ -41,3 +41,18 @@ demo = gr.Interface(
41
  inputs="text", outputs="text")
42
 
43
  demo.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  inputs="text", outputs="text")
42
 
43
  demo.launch()
44
+
45
+
46
+ # fix
47
+
48
+ chat_history = [
49
+ ["User", prompt],
50
+ ["OpenAI", responses["choices"][0]["text"]]
51
+ ]
52
+
53
+ # Create the radio blocks window
54
+ window = gr.Interface(title="History", fn=lambda: chat_history, inputs=None, outputs=chat_history, live=True).launch(share=True)
55
+ # Print out the chat history
56
+ print("Chat History:")
57
+ for message in chat_history:
58
+ print(f"{message[0]}: {message[1]}")