ccm commited on
Commit
9dc260f
·
verified ·
1 Parent(s): b3df94e

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -6
main.py CHANGED
@@ -90,6 +90,7 @@ def predict(message: str, history: list[str]) -> str:
90
  if isinstance(history, list):
91
  if len(history) > 0:
92
  history = history[-1]
 
93
  history_transformer_format = [
94
  {"role": "assistant" if idx&1 else "user", "content": msg}
95
  for idx, msg in enumerate(history)
@@ -122,11 +123,6 @@ def predict(message: str, history: list[str]) -> str:
122
 
123
 
124
  # Create and run the gradio interface
125
- CSS ="""
126
- .contain { display: flex; flex-direction: column; }
127
- #component-0 { height: 100%; }
128
- #chatbot { flex-grow: 1; }
129
- """
130
  gradio.ChatInterface(
131
  predict,
132
  examples=[
@@ -145,5 +141,4 @@ gradio.ChatInterface(
145
  theme = "monochrome",
146
  cache_examples = True,
147
  fill_height = True,
148
- css=CSS
149
  ).launch(debug=True)
 
90
  if isinstance(history, list):
91
  if len(history) > 0:
92
  history = history[-1]
93
+ print(history)
94
  history_transformer_format = [
95
  {"role": "assistant" if idx&1 else "user", "content": msg}
96
  for idx, msg in enumerate(history)
 
123
 
124
 
125
  # Create and run the gradio interface
 
 
 
 
 
126
  gradio.ChatInterface(
127
  predict,
128
  examples=[
 
141
  theme = "monochrome",
142
  cache_examples = True,
143
  fill_height = True,
 
144
  ).launch(debug=True)