acecalisto3 commited on
Commit
d3cfd6f
·
verified ·
1 Parent(s): 6e96ed2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -11
app.py CHANGED
@@ -998,12 +998,17 @@ def create_interface() -> gr.Blocks():
998
  """
999
  with gr.Blocks() as demo:
1000
  gr.Markdown("# All-in-One Scraper, Database, and RSS Feeder")
 
1001
  with gr.Row():
1002
  with gr.Column():
1003
- # Chat Interface
1004
- chat_history = gr.Chatbot(label="Chat History", type='messages') # Updated line
1005
- with gr.Row():
1006
- message = gr.Textbox(label="Message", placeholder="Type your message here...")
 
 
 
 
1007
  scrape_interval = gr.Slider(
1008
  minimum=1,
1009
  maximum=60,
@@ -1025,9 +1030,10 @@ def create_interface() -> gr.Blocks():
1025
  status_output = gr.Textbox(
1026
  label="Status Output", interactive=False, lines=2
1027
  )
 
1028
  with gr.Column():
1029
  # Chat Interface
1030
- chat_history = gr.Chatbot(label="Chat History")
1031
  with gr.Row():
1032
  message = gr.Textbox(label="Message", placeholder="Type your message here...")
1033
  system_message = gr.Textbox(
@@ -1080,8 +1086,8 @@ def create_interface() -> gr.Blocks():
1080
  )
1081
 
1082
  # Historical Data View
1083
- with gr.Row(): # Line 1002
1084
- with gr.Column(): # Line 1003 (Corrected indentation)
1085
  historical_view_url = gr.Textbox(
1086
  label="Select URL for Historical Data",
1087
  placeholder="https://example.com",
@@ -1093,8 +1099,6 @@ def create_interface() -> gr.Blocks():
1093
  interactive=False
1094
  )
1095
 
1096
-
1097
-
1098
  # Connect buttons to their respective functions
1099
  start_button.click(
1100
  fn=start_scraping,
@@ -1104,7 +1108,6 @@ def create_interface() -> gr.Blocks():
1104
  scrape_interval,
1105
  content_type,
1106
  selector,
1107
-
1108
  ],
1109
  outputs=status_output,
1110
  )
@@ -1159,7 +1162,6 @@ def create_interface() -> gr.Blocks():
1159
  )
1160
 
1161
  return demo
1162
-
1163
  # Function to display historical data
1164
  def display_historical_data(storage_location: str, url: str):
1165
  """
 
998
  """
999
  with gr.Blocks() as demo:
1000
  gr.Markdown("# All-in-One Scraper, Database, and RSS Feeder")
1001
+
1002
  with gr.Row():
1003
  with gr.Column():
1004
+ # Scraping Controls
1005
+ storage_location = gr.Textbox(
1006
+ value=DEFAULT_FILE_PATH, label="Storage Location"
1007
+ )
1008
+ urls = gr.Textbox(
1009
+ label="URLs (comma separated)",
1010
+ placeholder="https://example.com, https://anotherexample.com",
1011
+ )
1012
  scrape_interval = gr.Slider(
1013
  minimum=1,
1014
  maximum=60,
 
1030
  status_output = gr.Textbox(
1031
  label="Status Output", interactive=False, lines=2
1032
  )
1033
+
1034
  with gr.Column():
1035
  # Chat Interface
1036
+ chat_history = gr.Chatbot(label="Chat History", type='messages')
1037
  with gr.Row():
1038
  message = gr.Textbox(label="Message", placeholder="Type your message here...")
1039
  system_message = gr.Textbox(
 
1086
  )
1087
 
1088
  # Historical Data View
1089
+ with gr.Row():
1090
+ with gr.Column():
1091
  historical_view_url = gr.Textbox(
1092
  label="Select URL for Historical Data",
1093
  placeholder="https://example.com",
 
1099
  interactive=False
1100
  )
1101
 
 
 
1102
  # Connect buttons to their respective functions
1103
  start_button.click(
1104
  fn=start_scraping,
 
1108
  scrape_interval,
1109
  content_type,
1110
  selector,
 
1111
  ],
1112
  outputs=status_output,
1113
  )
 
1162
  )
1163
 
1164
  return demo
 
1165
  # Function to display historical data
1166
  def display_historical_data(storage_location: str, url: str):
1167
  """