SolshineMisfit commited on
Commit
829cff2
·
verified ·
1 Parent(s): 8010a87

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -228,17 +228,19 @@ def Dataset_Creator_Tool(dataset_name: str, conversation_data: str) -> str:
228
  A link to the created dataset on the Hugging Face Hub or an error message, along with log details.
229
  """
230
  try:
231
- log_text = ""
232
- log_text += f"Creating dataset '{dataset_name}' with {len(conversation_data)} characters of data\n"
233
  log_text += f"Dataset will be created at Misfits-and-Machines/{dataset_name.replace(' ', '_').lower()}\n"
 
 
234
  result = Dataset_Creator_Function(dataset_name, conversation_data)
235
  log_text += f"Dataset creation result: {result}\n"
 
236
  return log_text
237
  except Exception as e:
238
  import traceback
239
  error_trace = traceback.format_exc()
240
  return f"Error using Dataset Creator tool: {str(e)}\n{error_trace}"
241
-
242
  def verify_dataset_exists(repo_id: str) -> dict:
243
  """Verify that a dataset exists and is valid on the Hugging Face Hub.
244
 
 
228
  A link to the created dataset on the Hugging Face Hub or an error message, along with log details.
229
  """
230
  try:
231
+ log_text = f"Creating dataset '{dataset_name}' with {len(conversation_data)} characters of data\n"
 
232
  log_text += f"Dataset will be created at Misfits-and-Machines/{dataset_name.replace(' ', '_').lower()}\n"
233
+
234
+ # Call Dataset_Creator_Function directly without trying to define any new functions
235
  result = Dataset_Creator_Function(dataset_name, conversation_data)
236
  log_text += f"Dataset creation result: {result}\n"
237
+
238
  return log_text
239
  except Exception as e:
240
  import traceback
241
  error_trace = traceback.format_exc()
242
  return f"Error using Dataset Creator tool: {str(e)}\n{error_trace}"
243
+
244
  def verify_dataset_exists(repo_id: str) -> dict:
245
  """Verify that a dataset exists and is valid on the Hugging Face Hub.
246