acecalisto3 commited on
Commit
8c8eede
·
verified ·
1 Parent(s): c675c54

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py CHANGED
@@ -110,6 +110,19 @@ def update_model_config(model_name_input, gpu_layers_input):
110
  # You can replace this with the actual logic you need
111
  return f"Model config updated with model: {model_name_input}, GPU layers: {gpu_layers_input}"
112
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  # Define the Gradio interface
114
  def create_interface():
115
  with gr.Blocks() as demo:
 
110
  # You can replace this with the actual logic you need
111
  return f"Model config updated with model: {model_name_input}, GPU layers: {gpu_layers_input}"
112
 
113
+ def display_csv(selected_url):
114
+ # Get the CSV file path for the selected URL
115
+ hostname = urlparse(selected_url).hostname
116
+ csv_file_path = os.path.join(DEFAULT_FILE_PATH, f"{hostname}_changes.csv")
117
+
118
+ # Read the CSV file and return its content
119
+ if os.path.exists(csv_file_path):
120
+ with open(csv_file_path, "r") as csvfile:
121
+ csv_content = csvfile.read()
122
+ return csv_content
123
+ else:
124
+ return "No CSV content available for the selected URL."
125
+
126
  # Define the Gradio interface
127
  def create_interface():
128
  with gr.Blocks() as demo: