MilesCranmer commited on
Commit
88a78a4
1 Parent(s): 08f8ef7

Black formatting

Browse files
Files changed (2) hide show
  1. gui/app.py +7 -5
  2. gui/gen_example_data.py +1 -1
gui/app.py CHANGED
@@ -83,21 +83,23 @@ def greet(
83
  # Convert all columns to string type:
84
  df = df.astype(str)
85
  msg = (
86
- "Success!\n"
87
- f"You may run the model locally (faster) with "
88
- f"the following parameters:"
89
- +f"""
90
  model = PySRRegressor(
91
  niterations={niterations},
92
  binary_operators={str(binary_operators)},
93
  unary_operators={str(unary_operators)},
94
  maxsize={maxsize},
95
  )
96
- model.fit(X, y)""")
 
97
 
98
  df.to_csv("pysr_output.csv", index=False)
99
  return df, msg
100
 
 
101
  def main():
102
  demo = gr.Interface(
103
  fn=greet,
 
83
  # Convert all columns to string type:
84
  df = df.astype(str)
85
  msg = (
86
+ "Success!\n"
87
+ f"You may run the model locally (faster) with "
88
+ f"the following parameters:"
89
+ + f"""
90
  model = PySRRegressor(
91
  niterations={niterations},
92
  binary_operators={str(binary_operators)},
93
  unary_operators={str(unary_operators)},
94
  maxsize={maxsize},
95
  )
96
+ model.fit(X, y)"""
97
+ )
98
 
99
  df.to_csv("pysr_output.csv", index=False)
100
  return df, msg
101
 
102
+
103
  def main():
104
  demo = gr.Interface(
105
  fn=greet,
gui/gen_example_data.py CHANGED
@@ -14,4 +14,4 @@ X = pd.DataFrame(
14
  R = 8.3144598 # J/mol/K
15
  X["y"] = X["n"] * R * X["T"] / X["P"]
16
 
17
- X.to_csv("data.csv", index=False)
 
14
  R = 8.3144598 # J/mol/K
15
  X["y"] = X["n"] * R * X["T"] / X["P"]
16
 
17
+ X.to_csv("data.csv", index=False)