emeses commited on
Commit
a02844f
·
1 Parent(s): 1ae3fcb

Update space

Browse files
Files changed (1) hide show
  1. app.py +32 -32
app.py CHANGED
@@ -54,39 +54,39 @@ def extract_table(url):
54
  })
55
 
56
  # Create HTML table
57
- html = '''
58
- <style>
59
- .dataframe {
60
- border-collapse: collapse;
61
- width: 100%;
62
- margin: 10px 0;
63
- }
64
- .dataframe th, .dataframe td {
65
- border: 1px solid #ddd;
66
- padding: 8px;
67
- text-align: left;
68
- }
69
- .dataframe th {
70
- background-color: #f6f8fa;
71
- }
72
- .dataframe tr:nth-child(even) {
73
- background-color: #f9f9f9;
74
- }
75
- </style>
76
- '''
77
 
78
- html += '<table class="dataframe">'
79
- html += '<thead><tr><th>Date</th><th>Topic</th></tr></thead>'
80
- html += '<tbody>'
81
 
82
- for row in data:
83
- html += f'''
84
- <tr>
85
- <td>{row['Date']}</td>
86
- <td>{row['Topic']}</td>
87
- </tr>
88
- '''
89
- html += '</tbody></table>'
90
 
91
  # Generate choices for dropdown
92
  choices = [f"{row['Topic']} ({row['Date']})" for row in data]
@@ -160,7 +160,7 @@ with gr.Blocks() as demo:
160
  )
161
  prepare_btn = gr.Button("Prepare Topic")
162
 
163
- with gr.Column(scale=2):
164
  chatbot = gr.Chatbot()
165
  msg = gr.Textbox(label="Message")
166
  system_message = gr.Textbox(
 
54
  })
55
 
56
  # Create HTML table
57
+ # html = '''
58
+ # <style>
59
+ # .dataframe {
60
+ # border-collapse: collapse;
61
+ # width: 100%;
62
+ # margin: 10px 0;
63
+ # }
64
+ # .dataframe th, .dataframe td {
65
+ # border: 1px solid #ddd;
66
+ # padding: 8px;
67
+ # text-align: left;
68
+ # }
69
+ # .dataframe th {
70
+ # background-color: #f6f8fa;
71
+ # }
72
+ # .dataframe tr:nth-child(even) {
73
+ # background-color: #f9f9f9;
74
+ # }
75
+ # </style>
76
+ # '''
77
 
78
+ # html += '<table class="dataframe">'
79
+ # html += '<thead><tr><th>Date</th><th>Topic</th></tr></thead>'
80
+ # html += '<tbody>'
81
 
82
+ # for row in data:
83
+ # html += f'''
84
+ # <tr>
85
+ # <td>{row['Date']}</td>
86
+ # <td>{row['Topic']}</td>
87
+ # </tr>
88
+ # '''
89
+ # html += '</tbody></table>'
90
 
91
  # Generate choices for dropdown
92
  choices = [f"{row['Topic']} ({row['Date']})" for row in data]
 
160
  )
161
  prepare_btn = gr.Button("Prepare Topic")
162
 
163
+ with gr.Column(scale=3):
164
  chatbot = gr.Chatbot()
165
  msg = gr.Textbox(label="Message")
166
  system_message = gr.Textbox(