vpcom commited on
Commit
5d8c295
·
1 Parent(s): 92e9e27

feat: like dislike interface

Browse files
Files changed (1) hide show
  1. app.py +9 -5
app.py CHANGED
@@ -116,6 +116,13 @@ CSS = """
116
  #component-11 #component-12 {direction: rtl; white-space: pre-line;}
117
  p {direction: rtl; white-space: pre-line;}
118
  """
 
 
 
 
 
 
 
119
  with gr.Blocks(css=CSS) as demo:
120
  with gr.Row():
121
  with gr.Column():
@@ -125,10 +132,7 @@ with gr.Blocks(css=CSS) as demo:
125
  """
126
  )
127
 
128
- gr.ChatInterface(
129
- generate,
130
- examples=EXAMPLES,
131
- additional_inputs=additional_inputs
132
- )
133
 
134
  demo.queue(concurrency_count=100, api_open=False).launch(show_api=False) #, share=True)
 
116
  #component-11 #component-12 {direction: rtl; white-space: pre-line;}
117
  p {direction: rtl; white-space: pre-line;}
118
  """
119
+
120
+ chat_interface = gr.ChatInterface(
121
+ generate,
122
+ examples=EXAMPLES,
123
+ additional_inputs=additional_inputs
124
+ )
125
+
126
  with gr.Blocks(css=CSS) as demo:
127
  with gr.Row():
128
  with gr.Column():
 
132
  """
133
  )
134
 
135
+ chat_interface.like(vote, None, None)
136
+ chat_interface.render()
 
 
 
137
 
138
  demo.queue(concurrency_count=100, api_open=False).launch(show_api=False) #, share=True)