AmirMoris commited on
Commit
147c862
·
1 Parent(s): c740f6d
Files changed (5) hide show
  1. .idea/workspace.xml +24 -22
  2. Helper_functions.py +1 -1
  3. Kaggle_API.py +2 -3
  4. app.py +1 -2
  5. service_account.json +1 -1
.idea/workspace.xml CHANGED
@@ -6,6 +6,7 @@
6
  <component name="ChangeListManager">
7
  <list default="true" id="d268fe54-cb43-4451-8f43-ce4d20d5699c" name="Changes" comment="">
8
  <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
 
9
  <change beforePath="$PROJECT_DIR$/Kaggle_API.py" beforeDir="false" afterPath="$PROJECT_DIR$/Kaggle_API.py" afterDir="false" />
10
  <change beforePath="$PROJECT_DIR$/app.py" beforeDir="false" afterPath="$PROJECT_DIR$/app.py" afterDir="false" />
11
  </list>
@@ -20,33 +21,33 @@
20
  <component name="MarkdownSettingsMigration">
21
  <option name="stateVersion" value="1" />
22
  </component>
23
- <component name="ProjectColorInfo"><![CDATA[{
24
- "customColor": "",
25
- "associatedIndex": 1
26
- }]]></component>
27
  <component name="ProjectId" id="2fWbi11HVd4VaSJdU86hTIXVVnG" />
28
  <component name="ProjectViewState">
29
  <option name="hideEmptyMiddlePackages" value="true" />
30
  <option name="showLibraryContents" value="true" />
31
  </component>
32
- <component name="PropertiesComponent"><![CDATA[{
33
- "keyToString": {
34
- "RunOnceActivity.OpenProjectViewOnStart": "true",
35
- "RunOnceActivity.ShowReadmeOnStart": "true",
36
- "git-widget-placeholder": "main",
37
- "kotlin-language-version-configured": "true",
38
- "last_opened_file_path": "C:/Users/Amir/anaconda3/envs/env",
39
- "node.js.detected.package.eslint": "true",
40
- "node.js.detected.package.tslint": "true",
41
- "node.js.selected.package.eslint": "(autodetect)",
42
- "node.js.selected.package.tslint": "(autodetect)",
43
- "nodejs_package_manager_path": "npm",
44
- "project.structure.last.edited": "Modules",
45
- "project.structure.proportion": "0.0",
46
- "project.structure.side.proportion": "0.0",
47
- "vue.rearranger.settings.migration": "true"
48
  }
49
- }]]></component>
50
  <component name="SharedIndexes">
51
  <attachedChunks>
52
  <set>
@@ -62,7 +63,8 @@
62
  <option name="number" value="Default" />
63
  <option name="presentableId" value="Default" />
64
  <updated>1713919907805</updated>
65
- <workItem from="1713919910236" duration="767000" />
 
66
  </task>
67
  <servers />
68
  </component>
 
6
  <component name="ChangeListManager">
7
  <list default="true" id="d268fe54-cb43-4451-8f43-ce4d20d5699c" name="Changes" comment="">
8
  <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
9
+ <change beforePath="$PROJECT_DIR$/Helper_functions.py" beforeDir="false" afterPath="$PROJECT_DIR$/Helper_functions.py" afterDir="false" />
10
  <change beforePath="$PROJECT_DIR$/Kaggle_API.py" beforeDir="false" afterPath="$PROJECT_DIR$/Kaggle_API.py" afterDir="false" />
11
  <change beforePath="$PROJECT_DIR$/app.py" beforeDir="false" afterPath="$PROJECT_DIR$/app.py" afterDir="false" />
12
  </list>
 
21
  <component name="MarkdownSettingsMigration">
22
  <option name="stateVersion" value="1" />
23
  </component>
24
+ <component name="ProjectColorInfo">{
25
+ &quot;customColor&quot;: &quot;&quot;,
26
+ &quot;associatedIndex&quot;: 1
27
+ }</component>
28
  <component name="ProjectId" id="2fWbi11HVd4VaSJdU86hTIXVVnG" />
29
  <component name="ProjectViewState">
30
  <option name="hideEmptyMiddlePackages" value="true" />
31
  <option name="showLibraryContents" value="true" />
32
  </component>
33
+ <component name="PropertiesComponent">{
34
+ &quot;keyToString&quot;: {
35
+ &quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
36
+ &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
37
+ &quot;git-widget-placeholder&quot;: &quot;main&quot;,
38
+ &quot;kotlin-language-version-configured&quot;: &quot;true&quot;,
39
+ &quot;last_opened_file_path&quot;: &quot;C:/Users/Amir/anaconda3/envs/env&quot;,
40
+ &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
41
+ &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
42
+ &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
43
+ &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
44
+ &quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
45
+ &quot;project.structure.last.edited&quot;: &quot;Modules&quot;,
46
+ &quot;project.structure.proportion&quot;: &quot;0.0&quot;,
47
+ &quot;project.structure.side.proportion&quot;: &quot;0.0&quot;,
48
+ &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
49
  }
50
+ }</component>
51
  <component name="SharedIndexes">
52
  <attachedChunks>
53
  <set>
 
63
  <option name="number" value="Default" />
64
  <option name="presentableId" value="Default" />
65
  <updated>1713919907805</updated>
66
+ <workItem from="1713919910236" duration="1099000" />
67
+ <workItem from="1713921043559" duration="70000" />
68
  </task>
69
  <servers />
70
  </component>
Helper_functions.py CHANGED
@@ -83,4 +83,4 @@ def create_folder(path: str, Replace_if_exist = True):
83
  os.makedirs(path, exist_ok=False)
84
  print(f"Folder '{path}' created successfully.")
85
  except Exception as e:
86
- print(f"Failed to create folder '{path}'. Error: {e}")
 
83
  os.makedirs(path, exist_ok=False)
84
  print(f"Folder '{path}' created successfully.")
85
  except Exception as e:
86
+ print(f"Failed to create folder '{path}'. Error: {e}")
Kaggle_API.py CHANGED
@@ -1,6 +1,5 @@
1
  import time
2
 
3
- from GoogleDrive_API import GoogleDrive_API
4
  from Helper_functions import *
5
 
6
 
@@ -31,7 +30,7 @@ class API_Connection:
31
  return self.push_kaggle_notebook(notebook_path)
32
 
33
  def generate_image(self, input_image_name: str, edit_instruction: str, output_image_name: str,
34
- steps: int, seed: int, cfgtext: float, cfgimage: float, resolution: int
35
  ):
36
 
37
  if len(input_image_name) == 0:
@@ -112,4 +111,4 @@ def main():
112
 
113
 
114
  if __name__ == "__main__":
115
- main()
 
1
  import time
2
 
 
3
  from Helper_functions import *
4
 
5
 
 
30
  return self.push_kaggle_notebook(notebook_path)
31
 
32
  def generate_image(self, input_image_name: str, edit_instruction: str, output_image_name: str,
33
+ steps: int, seed: int, cfgtext: float, cfgimage: float, resolution: int
34
  ):
35
 
36
  if len(input_image_name) == 0:
 
111
 
112
 
113
  if __name__ == "__main__":
114
+ main()
app.py CHANGED
@@ -52,7 +52,6 @@ def generate_button_clicked(*args):
52
  if len(edit_instruction) == 0:
53
  raise gr.Error("Missing Input: edit_instruction")
54
 
55
- GoogleDrive_connection = ""
56
  GoogleDrive_connection = GoogleDrive_API("service_account.json")
57
  api_connection = API_Connection(GoogleDrive_connection, kaggle_username, kaggle_key)
58
 
@@ -168,4 +167,4 @@ def main():
168
 
169
 
170
  if __name__ == "__main__":
171
- main()
 
52
  if len(edit_instruction) == 0:
53
  raise gr.Error("Missing Input: edit_instruction")
54
 
 
55
  GoogleDrive_connection = GoogleDrive_API("service_account.json")
56
  api_connection = API_Connection(GoogleDrive_connection, kaggle_username, kaggle_key)
57
 
 
167
 
168
 
169
  if __name__ == "__main__":
170
+ main()
service_account.json CHANGED
@@ -10,4 +10,4 @@
10
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
11
  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/graduation-project%40graduation-project-420420.iam.gserviceaccount.com",
12
  "universe_domain": "googleapis.com"
13
- }
 
10
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
11
  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/graduation-project%40graduation-project-420420.iam.gserviceaccount.com",
12
  "universe_domain": "googleapis.com"
13
+ }