alistairmcleay commited on
Commit
057d34c
β€’
1 Parent(s): 25e3ea5

UI small adjustments

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -87,6 +87,7 @@ def change_sp_goal():
87
  def ds_chatbot(user_utt):
88
  turn_id = len(ds_history)
89
  sys_response = sys_model.response(user_utt, turn_id)
 
90
  ds_history.append((user_utt, sys_response))
91
  return ds_history
92
 
@@ -109,6 +110,7 @@ def self_play():
109
 
110
  turn_id = len(self_play_history)
111
  sys_response = self_play_sys_model.response(user_utt, turn_id)
 
112
 
113
  self_play_history.append((user_utt, sys_response))
114
 
@@ -122,7 +124,7 @@ def self_play():
122
  block = gr.Blocks()
123
 
124
  with block:
125
- gr.Markdown("# πŸ’¬ Jointly Optimized Task-Oriented Dialogue System And User Simulator")
126
  gr.Markdown(
127
  "Created by [Alistair McLeay](https://alistairmcleay.com) for the [Masters in Machine Learning & Machine Intelligence at Cambridge University](https://www.mlmi.eng.cam.ac.uk/). <br/>\
128
  Thank you to [Professor Bill Byrne](https://sites.google.com/view/bill-byrne/home) for his supervision and guidance. <br/> \
@@ -170,11 +172,6 @@ with block:
170
  new_sp_goal_button = gr.Button("Generate New Goal")
171
  current_sp_goal_yaml = gr.outputs.Textbox(label="New Goal (YAML)")
172
 
173
- gr.Markdown("## System Architecture Overview")
174
- gr.Markdown(
175
- "![System Architecture](https://huggingface.co/spaces/alistairmcleay/cambridge-masters-project/blob/main/system_architecture.png)"
176
- )
177
-
178
  ds_button.click(ds_chatbot, ds_input_text, ds_response)
179
  us_button.click(us_chatbot, us_input_text, us_response)
180
  self_play_button.click(self_play, None, self_play_response)
 
87
  def ds_chatbot(user_utt):
88
  turn_id = len(ds_history)
89
  sys_response = sys_model.response(user_utt, turn_id)
90
+ sys_response = sys_response[0].upper() + sys_response[1:]
91
  ds_history.append((user_utt, sys_response))
92
  return ds_history
93
 
 
110
 
111
  turn_id = len(self_play_history)
112
  sys_response = self_play_sys_model.response(user_utt, turn_id)
113
+ sys_response = sys_response[0].upper() + sys_response[1:]
114
 
115
  self_play_history.append((user_utt, sys_response))
116
 
 
124
  block = gr.Blocks()
125
 
126
  with block:
127
+ gr.Markdown("# πŸ’¬ Jointly Optimized Task-Oriented Dialogue System And User Simulator πŸ’¬")
128
  gr.Markdown(
129
  "Created by [Alistair McLeay](https://alistairmcleay.com) for the [Masters in Machine Learning & Machine Intelligence at Cambridge University](https://www.mlmi.eng.cam.ac.uk/). <br/>\
130
  Thank you to [Professor Bill Byrne](https://sites.google.com/view/bill-byrne/home) for his supervision and guidance. <br/> \
 
172
  new_sp_goal_button = gr.Button("Generate New Goal")
173
  current_sp_goal_yaml = gr.outputs.Textbox(label="New Goal (YAML)")
174
 
 
 
 
 
 
175
  ds_button.click(ds_chatbot, ds_input_text, ds_response)
176
  us_button.click(us_chatbot, us_input_text, us_response)
177
  self_play_button.click(self_play, None, self_play_response)