yizhangliu commited on
Commit
eec1fc1
1 Parent(s): a06cd10

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -72,8 +72,6 @@ start_work = """async() => {
72
 
73
  page1.style.display = "none";
74
  page2.style.display = "block";
75
- window['gradioEl'].querySelectorAll('#component-1')[0].style.display = "none";
76
- window['gradioEl'].querySelectorAll('#component-2')[0].style.display = "none";
77
 
78
  window['div_count'] = 0;
79
  window['chat_bot'] = window['gradioEl'].querySelectorAll('#chat_bot')[0];
@@ -83,7 +81,13 @@ start_work = """async() => {
83
  window['chat_bot1'].children[1].textContent = '';
84
 
85
  clientHeight = getClientHeight();
86
- new_height = (clientHeight-200) + 'px';
 
 
 
 
 
 
87
  chat_row.style.height = new_height;
88
  window['chat_bot'].style.height = new_height;
89
  window['chat_bot'].children[2].style.height = new_height;
 
72
 
73
  page1.style.display = "none";
74
  page2.style.display = "block";
 
 
75
 
76
  window['div_count'] = 0;
77
  window['chat_bot'] = window['gradioEl'].querySelectorAll('#chat_bot')[0];
 
81
  window['chat_bot1'].children[1].textContent = '';
82
 
83
  clientHeight = getClientHeight();
84
+ if (isMobile()) {
85
+ window['gradioEl'].querySelectorAll('#component-1')[0].style.display = "none";
86
+ window['gradioEl'].querySelectorAll('#component-2')[0].style.display = "none";
87
+ new_height = (clientHeight - 200) + 'px';
88
+ } else {
89
+ new_height = (clientHeight - 300) + 'px';
90
+ }
91
  chat_row.style.height = new_height;
92
  window['chat_bot'].style.height = new_height;
93
  window['chat_bot'].children[2].style.height = new_height;