fix
Browse files- .idea/workspace.xml +24 -22
- Helper_functions.py +1 -1
- Kaggle_API.py +2 -3
- app.py +1 -2
- 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">
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
}
|
| 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">
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
}
|
| 49 |
-
}
|
| 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="
|
|
|
|
| 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 |
+
"customColor": "",
|
| 26 |
+
"associatedIndex": 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 |
+
"keyToString": {
|
| 35 |
+
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
| 36 |
+
"RunOnceActivity.ShowReadmeOnStart": "true",
|
| 37 |
+
"git-widget-placeholder": "main",
|
| 38 |
+
"kotlin-language-version-configured": "true",
|
| 39 |
+
"last_opened_file_path": "C:/Users/Amir/anaconda3/envs/env",
|
| 40 |
+
"node.js.detected.package.eslint": "true",
|
| 41 |
+
"node.js.detected.package.tslint": "true",
|
| 42 |
+
"node.js.selected.package.eslint": "(autodetect)",
|
| 43 |
+
"node.js.selected.package.tslint": "(autodetect)",
|
| 44 |
+
"nodejs_package_manager_path": "npm",
|
| 45 |
+
"project.structure.last.edited": "Modules",
|
| 46 |
+
"project.structure.proportion": "0.0",
|
| 47 |
+
"project.structure.side.proportion": "0.0",
|
| 48 |
+
"vue.rearranger.settings.migration": "true"
|
| 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 |
-
|
| 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 |
+
}
|