asmaa1 commited on
Commit
0fb9d8d
·
verified ·
1 Parent(s): c162f3b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -30,6 +30,17 @@ process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=s
30
 
31
  time.sleep(5) # Wait for the server to start
32
 
 
 
 
 
 
 
 
 
 
 
 
33
  # Function to interact with the Ollama model
34
 
35
  def query_model(input_text):
 
30
 
31
  time.sleep(5) # Wait for the server to start
32
 
33
+ f = h5py.File("best_model_2.h5", mode="r+")
34
+ model_config_string = f.attrs.get("model_config")
35
+ if model_config_string.find('"groups": 1,') != -1:
36
+ model_config_string = model_config_string.replace('"groups": 1,', '')
37
+ f.attrs.modify('model_config', model_config_string)
38
+ f.flush()
39
+ model_config_string = f.attrs.get("model_config")
40
+ assert model_config_string.find('"groups": 1,') == -1
41
+
42
+ f.close()
43
+
44
  # Function to interact with the Ollama model
45
 
46
  def query_model(input_text):