IPF commited on
Commit
96f6fb7
·
verified ·
1 Parent(s): 08aad93

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +42 -23
app.py CHANGED
@@ -1557,6 +1557,22 @@ def create_interface():
1557
  }
1558
 
1559
  /* Settings Section */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1560
  .settings-header {
1561
  display: flex;
1562
  align-items: center;
@@ -1608,7 +1624,7 @@ def create_interface():
1608
 
1609
  /* Tools Section */
1610
  .tools-section {
1611
- margin-top: 1rem;
1612
  }
1613
 
1614
  .tools-title {
@@ -1616,7 +1632,7 @@ def create_interface():
1616
  font-weight: 600;
1617
  color: #374151;
1618
  margin-bottom: 0.5rem;
1619
- margin-top: 0.5rem;
1620
  }
1621
 
1622
  /* Tool Item */
@@ -1787,8 +1803,17 @@ def create_interface():
1787
  @media (prefers-color-scheme: dark) {
1788
  /* Settings 区域 */
1789
  #settings-group {
 
 
 
 
 
 
 
1790
  background: #1f2937 !important;
1791
- border-color: #374151 !important;
 
 
1792
  }
1793
 
1794
  .settings-title,
@@ -2137,7 +2162,7 @@ def create_interface():
2137
  gr.HTML(header_html)
2138
 
2139
  gr.HTML("""
2140
- <div style="display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; margin-top: 0px; margin-bottom: 24px;">
2141
  <a href="https://huggingface.co/datasets/OpenResearcher/OpenResearcher-Dataset" target="_blank">
2142
  <img src="https://img.shields.io/badge/Dataset-FFB7B2?style=for-the-badge&logo=huggingface&logoColor=ffffff" alt="Dataset" style="height: 28px;">
2143
  </a>
@@ -2166,22 +2191,16 @@ def create_interface():
2166
  <div class="settings-header">
2167
  <span class="settings-title">⚙️ Settings</span>
2168
  </div>
2169
- <div class="settings-api-row">
2170
- <span class="settings-label">Serper API Key</span>
2171
- <a href="https://serper.dev/" target="_blank" class="settings-help-link" title="How to get Serper API Key">
2172
- <span class="settings-help-icon">?</span>
2173
- <span>How to get</span>
2174
- </a>
2175
- </div>
2176
  ''')
2177
  serper_input = gr.Textbox(
2178
  label="",
2179
- value=SERPER_API_KEY,
2180
  type="password",
2181
  placeholder="Enter your Serper API key...",
2182
  show_label=False,
2183
  elem_id="serper-api-input",
2184
- container=False
 
2185
  )
2186
  max_rounds_input = gr.Slider(
2187
  minimum=1,
@@ -2198,6 +2217,16 @@ def create_interface():
2198
  interactive=True
2199
  )
2200
 
 
 
 
 
 
 
 
 
 
 
2201
  # Example carousel with navigation
2202
  gr.HTML("""
2203
  <div class="examples-section">
@@ -2227,16 +2256,6 @@ def create_interface():
2227
  </div>
2228
  """)
2229
 
2230
- # Tools info
2231
- gr.HTML("""
2232
- <div class="tools-section">
2233
- <div class="tools-title">🛠️ Available Tools</div>
2234
- <div class="tool-item"><strong>browser.search</strong><br><span>Search the web</span></div>
2235
- <div class="tool-item"><strong>browser.open</strong><br><span>Open & read pages</span></div>
2236
- <div class="tool-item"><strong>browser.find</strong><br><span>Find text in page</span></div>
2237
- </div>
2238
- """)
2239
-
2240
  # Main content area (30-70)
2241
  with gr.Column(scale=3, elem_id="main-content"):
2242
  # Output area (on top, hidden initially)
 
1557
  }
1558
 
1559
  /* Settings Section */
1560
+ #settings-group {
1561
+ background: transparent !important;
1562
+ border: none !important;
1563
+ padding: 0 !important;
1564
+ box-shadow: none !important;
1565
+ gap: 0 !important;
1566
+ }
1567
+
1568
+ #max-rounds-slider, #auto-scroll-checkbox {
1569
+ background: #f9fafb;
1570
+ border: 1px solid #e5e7eb;
1571
+ border-radius: 6px;
1572
+ padding: 0.75rem;
1573
+ margin-bottom: 0.5rem;
1574
+ }
1575
+
1576
  .settings-header {
1577
  display: flex;
1578
  align-items: center;
 
1624
 
1625
  /* Tools Section */
1626
  .tools-section {
1627
+ margin-top: 0;
1628
  }
1629
 
1630
  .tools-title {
 
1632
  font-weight: 600;
1633
  color: #374151;
1634
  margin-bottom: 0.5rem;
1635
+ margin-top: 0;
1636
  }
1637
 
1638
  /* Tool Item */
 
1803
  @media (prefers-color-scheme: dark) {
1804
  /* Settings 区域 */
1805
  #settings-group {
1806
+ background: transparent !important;
1807
+ border: none !important;
1808
+ padding: 0 !important;
1809
+ gap: 0 !important;
1810
+ }
1811
+
1812
+ #max-rounds-slider, #auto-scroll-checkbox {
1813
  background: #1f2937 !important;
1814
+ border: 1px solid #374151 !important;
1815
+ border-radius: 6px !important;
1816
+ padding: 0.75rem !important;
1817
  }
1818
 
1819
  .settings-title,
 
2162
  gr.HTML(header_html)
2163
 
2164
  gr.HTML("""
2165
+ <div style="display: flex; gap: 0px; justify-content: center; flex-wrap: wrap; margin-top: 0px; margin-bottom: 24px;">
2166
  <a href="https://huggingface.co/datasets/OpenResearcher/OpenResearcher-Dataset" target="_blank">
2167
  <img src="https://img.shields.io/badge/Dataset-FFB7B2?style=for-the-badge&logo=huggingface&logoColor=ffffff" alt="Dataset" style="height: 28px;">
2168
  </a>
 
2191
  <div class="settings-header">
2192
  <span class="settings-title">⚙️ Settings</span>
2193
  </div>
 
 
 
 
 
 
 
2194
  ''')
2195
  serper_input = gr.Textbox(
2196
  label="",
2197
+ value="ae6413538b4b7c4e7ae5a4cdaa1ce549e74ba8ce",
2198
  type="password",
2199
  placeholder="Enter your Serper API key...",
2200
  show_label=False,
2201
  elem_id="serper-api-input",
2202
+ container=False,
2203
+ visible=False
2204
  )
2205
  max_rounds_input = gr.Slider(
2206
  minimum=1,
 
2217
  interactive=True
2218
  )
2219
 
2220
+ # Tools info
2221
+ gr.HTML("""
2222
+ <div class="tools-section">
2223
+ <div class="tools-title">🛠️ Available Tools</div>
2224
+ <div class="tool-item"><strong>browser.search</strong><br><span>Search the web</span></div>
2225
+ <div class="tool-item"><strong>browser.open</strong><br><span>Open & read pages</span></div>
2226
+ <div class="tool-item"><strong>browser.find</strong><br><span>Find text in page</span></div>
2227
+ </div>
2228
+ """)
2229
+
2230
  # Example carousel with navigation
2231
  gr.HTML("""
2232
  <div class="examples-section">
 
2256
  </div>
2257
  """)
2258
 
 
 
 
 
 
 
 
 
 
 
2259
  # Main content area (30-70)
2260
  with gr.Column(scale=3, elem_id="main-content"):
2261
  # Output area (on top, hidden initially)