neuralleap commited on
Commit
9bf1fc6
·
verified ·
1 Parent(s): 9a2afdf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -63,12 +63,15 @@ with gr.Blocks(title="OpenAI x Gradio Chat") as demo:
63
 
64
  chat = gr.ChatInterface(
65
  fn=chat_fn,
66
- type="messages", # use OpenAI-style message dicts
67
  additional_inputs=[system_prompt, temperature, model_name],
68
  textbox=gr.Textbox(placeholder="Ask me anything…"),
69
- examples=["Explain transformers in one paragraph", "Write a dad joke about databases"],
 
 
 
70
  cache_examples=False,
71
- save_history=True, # saves chat logs
72
  flagging_mode="manual",
73
  flagging_options=["👍 Useful", "👎 Not good", "⚠ Inaccurate"],
74
  )
 
63
 
64
  chat = gr.ChatInterface(
65
  fn=chat_fn,
66
+ type="messages",
67
  additional_inputs=[system_prompt, temperature, model_name],
68
  textbox=gr.Textbox(placeholder="Ask me anything…"),
69
+ examples=[
70
+ ["Explain transformers in one paragraph", DEFAULT_SYS_PROMPT, 0.7, "gpt-4o-mini"],
71
+ ["Write a dad joke about databases", DEFAULT_SYS_PROMPT, 0.7, "gpt-4o-mini"]
72
+ ],
73
  cache_examples=False,
74
+ save_history=True,
75
  flagging_mode="manual",
76
  flagging_options=["👍 Useful", "👎 Not good", "⚠ Inaccurate"],
77
  )