google api
Browse files- .idea/.gitignore +0 -8
- .idea/Text_Driven_Image_to_Image_Generation.iml +1 -1
- .idea/misc.xml +3 -0
- .idea/workspace.xml +67 -0
- app.py +2 -1
- service_account.json +0 -13
.idea/.gitignore
DELETED
|
@@ -1,8 +0,0 @@
|
|
| 1 |
-
# Default ignored files
|
| 2 |
-
/shelf/
|
| 3 |
-
/workspace.xml
|
| 4 |
-
# Editor-based HTTP Client requests
|
| 5 |
-
/httpRequests/
|
| 6 |
-
# Datasource local storage ignored files
|
| 7 |
-
/dataSources/
|
| 8 |
-
/dataSources.local.xml
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.idea/Text_Driven_Image_to_Image_Generation.iml
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
| 4 |
<exclude-output />
|
| 5 |
<content url="file://$MODULE_DIR$" />
|
| 6 |
-
<orderEntry type="
|
| 7 |
<orderEntry type="sourceFolder" forTests="false" />
|
| 8 |
</component>
|
| 9 |
</module>
|
|
|
|
| 3 |
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
| 4 |
<exclude-output />
|
| 5 |
<content url="file://$MODULE_DIR$" />
|
| 6 |
+
<orderEntry type="jdk" jdkName="Python 3.11 (base)" jdkType="Python SDK" />
|
| 7 |
<orderEntry type="sourceFolder" forTests="false" />
|
| 8 |
</component>
|
| 9 |
</module>
|
.idea/misc.xml
CHANGED
|
@@ -1,5 +1,8 @@
|
|
| 1 |
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
<project version="4">
|
|
|
|
|
|
|
|
|
|
| 3 |
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
|
| 4 |
<output url="file://$PROJECT_DIR$/out" />
|
| 5 |
</component>
|
|
|
|
| 1 |
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
<project version="4">
|
| 3 |
+
<component name="Black">
|
| 4 |
+
<option name="sdkName" value="Python 3.11 (base)" />
|
| 5 |
+
</component>
|
| 6 |
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
|
| 7 |
<output url="file://$PROJECT_DIR$/out" />
|
| 8 |
</component>
|
.idea/workspace.xml
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<project version="4">
|
| 3 |
+
<component name="ChangeListManager">
|
| 4 |
+
<list default="true" id="d268fe54-cb43-4451-8f43-ce4d20d5699c" name="Changes" comment="">
|
| 5 |
+
<change beforePath="$PROJECT_DIR$/.idea/.gitignore" beforeDir="false" />
|
| 6 |
+
<change beforePath="$PROJECT_DIR$/.idea/Text_Driven_Image_to_Image_Generation.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/Text_Driven_Image_to_Image_Generation.iml" afterDir="false" />
|
| 7 |
+
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
|
| 8 |
+
<change beforePath="$PROJECT_DIR$/app.py" beforeDir="false" afterPath="$PROJECT_DIR$/app.py" afterDir="false" />
|
| 9 |
+
<change beforePath="$PROJECT_DIR$/service_account.json" beforeDir="false" />
|
| 10 |
+
</list>
|
| 11 |
+
<option name="SHOW_DIALOG" value="false" />
|
| 12 |
+
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
| 13 |
+
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
| 14 |
+
<option name="LAST_RESOLUTION" value="IGNORE" />
|
| 15 |
+
</component>
|
| 16 |
+
<component name="Git.Settings">
|
| 17 |
+
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
| 18 |
+
</component>
|
| 19 |
+
<component name="MarkdownSettingsMigration">
|
| 20 |
+
<option name="stateVersion" value="1" />
|
| 21 |
+
</component>
|
| 22 |
+
<component name="ProjectColorInfo"><![CDATA[{
|
| 23 |
+
"customColor": "",
|
| 24 |
+
"associatedIndex": 1
|
| 25 |
+
}]]></component>
|
| 26 |
+
<component name="ProjectId" id="2fWbi11HVd4VaSJdU86hTIXVVnG" />
|
| 27 |
+
<component name="ProjectViewState">
|
| 28 |
+
<option name="hideEmptyMiddlePackages" value="true" />
|
| 29 |
+
<option name="showLibraryContents" value="true" />
|
| 30 |
+
</component>
|
| 31 |
+
<component name="PropertiesComponent"><![CDATA[{
|
| 32 |
+
"keyToString": {
|
| 33 |
+
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
| 34 |
+
"RunOnceActivity.ShowReadmeOnStart": "true",
|
| 35 |
+
"git-widget-placeholder": "main",
|
| 36 |
+
"kotlin-language-version-configured": "true",
|
| 37 |
+
"last_opened_file_path": "C:/Users/Amir/anaconda3/envs/env",
|
| 38 |
+
"nodejs_package_manager_path": "npm",
|
| 39 |
+
"project.structure.last.edited": "Modules",
|
| 40 |
+
"project.structure.proportion": "0.0",
|
| 41 |
+
"project.structure.side.proportion": "0.0",
|
| 42 |
+
"vue.rearranger.settings.migration": "true"
|
| 43 |
+
}
|
| 44 |
+
}]]></component>
|
| 45 |
+
<component name="SharedIndexes">
|
| 46 |
+
<attachedChunks>
|
| 47 |
+
<set>
|
| 48 |
+
<option value="jdk-11.0.21-corretto-11.0.21-3183f394aec4-d55de845" />
|
| 49 |
+
</set>
|
| 50 |
+
</attachedChunks>
|
| 51 |
+
</component>
|
| 52 |
+
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
| 53 |
+
<component name="TaskManager">
|
| 54 |
+
<task active="true" id="Default" summary="Default task">
|
| 55 |
+
<changelist id="d268fe54-cb43-4451-8f43-ce4d20d5699c" name="Changes" comment="" />
|
| 56 |
+
<created>1713919907805</created>
|
| 57 |
+
<option name="number" value="Default" />
|
| 58 |
+
<option name="presentableId" value="Default" />
|
| 59 |
+
<updated>1713919907805</updated>
|
| 60 |
+
<workItem from="1713919910236" duration="103000" />
|
| 61 |
+
</task>
|
| 62 |
+
<servers />
|
| 63 |
+
</component>
|
| 64 |
+
<component name="TypeScriptGeneratedFilesManager">
|
| 65 |
+
<option name="version" value="3" />
|
| 66 |
+
</component>
|
| 67 |
+
</project>
|
app.py
CHANGED
|
@@ -52,7 +52,8 @@ def generate_button_clicked(*args):
|
|
| 52 |
if len(edit_instruction) == 0:
|
| 53 |
raise gr.Error("Missing Input: edit_instruction")
|
| 54 |
|
| 55 |
-
GoogleDrive_connection =
|
|
|
|
| 56 |
api_connection = API_Connection(GoogleDrive_connection, kaggle_username, kaggle_key)
|
| 57 |
|
| 58 |
create_folder("local_dataset")
|
|
|
|
| 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 |
|
| 59 |
create_folder("local_dataset")
|
service_account.json
DELETED
|
@@ -1,13 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"type": "service_account",
|
| 3 |
-
"project_id": "graduation-project-420420",
|
| 4 |
-
"private_key_id": "514ceeaa4abc9a06525ab7f5b224cb9421da5c43",
|
| 5 |
-
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDYskZd2uJSE/wN\n6xnh90qoi93WidUNN/xOloOzwlFeWk6+5/UP1OQ4WcInnIZae2wO2q4rAZL2vnsb\n7h3joQMicoqKBKQ58qPEO0gb7yXirAQW6XmTrPnJl0EakdGTQFurQynFEsjVa9fQ\nmFjTQtMXa3X48tlb5ip94TwgnNcw3+DtHmkU8Sg5RAV1+Tl8dMUEQ7F2ZwtcggOu\nDKzRcekr89f8fSBeq6S8a4UaAnVGiy03MGk6GOVQAF7LlOPGjBs97wkH7Qt9OLMp\nYcMQ3mFZOdgpJnYrP0pM1C/LASJ4ysv9GAVWKU+cpOC2zmj17HO6Qe6i6IEF82s8\nSj6bOawDAgMBAAECggEAYfMHcpInffFRnBr6ipUEtrXuMvT/jCeT0RQg+QarUApj\nEND5iUvyUvRjmhMa+dhTKk23r3HZM9Y7AI98DDHyIEaFD8j0UMs4MlGXkSTiy5h0\nisTDMzjbeb94aqGiCTzskrfbsByDElFabowGjovkre/hlgNzs6IQ7/B5BMbQUGL0\n1bXvFW9x1n5XK8Rbd3ls74F7Qob3tSMOv7zZ2MRHv/VtzOFVgobFipwG615+LJ1G\nuYtbQ2qSYdc82s/801OLVhuUDJzaaadrPORQH6ThwX+KqJeN91egVYfG1d/nwUuF\n0EqUbuUQrGJD90iobNzz/04Xoej/7Y9NGxbvE1/uKQKBgQD5x6bxsOMIwoXD9wdd\ntq2e7yiaQZ+YCwD2iwPbkkZvVBzHBe0fd2qTdl8e7F43VjJwyARcKHZ8AncjfQeG\nezvJFL2TLPi/8XEI41ZDqrH4Cb+Dsp6m5pRqIfxdoiVH10vcdyKQOKP4KOuy4+GV\n+PEdkh1qEXzZj+i2HNLGfpCJmwKBgQDeF7cbNKi2pwcTDuzjLzIZrYEkv24oO7l5\nexAqnn3xw1281kRZlilZePPJfZidMkRAidtySaxrluHXxk2Fo9ZHu7hDI6mtZ9Kq\nxJCHeakhaW0zotJ4SQN07zNnR+6+bTgh7ZisSOKnsQUkQLJC4/pShUzjdHGHE1Mf\nz6ERv0/huQKBgQDganMh/61b93m7obzqg/DmNTYjsgYz0t8go7HpmzjRWZ8pabes\nZ9xHdTjtTa0wxq83CV5xdqFNteFY70LNnvcOKSZSjztHKSRHugmNblXL5uY860UD\n63M5ECPv9HjOXS95e0iAj4MyuYFbDsdluW7ZBKiM3f1wc42/4ZG2aYxvNQKBgQDA\nY8LW6nMMZvyV4eQLmaLI46hv8PS4HaS6O4TxpoJroFXfc62Z/Z6sRz7IWOiPpC/D\nyKg1BOU7/mR9yub00cyaL1+bqZUfBkVUcRrSgO2mZ/GVPYMdeAJqlZvt6D5E79Ak\nc/JBrJHLumk90l2Z3GvIeHj2wLRn0rG7aN2axiOo4QKBgQD0f6HGlvVsc4OoqZMk\nj+ynqAmOcKtanD36GAFtRN6Ztb/7VsyX3LJe2KS71MXhnjN/hb6ug4jROjqMPI+q\nqT6zXJgRNu2n35NYDtzg8LD9J7dYM4vTeQsKF+leFT6XRQpkOBxvbgvGjaNrTCwN\nJCmUCo24od5hKOmqiQQCEMJS5g==\n-----END PRIVATE KEY-----\n",
|
| 6 |
-
"client_email": "graduation-project@graduation-project-420420.iam.gserviceaccount.com",
|
| 7 |
-
"client_id": "106719380856521616350",
|
| 8 |
-
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
|
| 9 |
-
"token_uri": "https://oauth2.googleapis.com/token",
|
| 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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|