fix google drive link
Browse files- .gitignore +1 -2
- .idea/workspace.xml +9 -1
- Kaggle_API.py +2 -2
- app.py +3 -3
.gitignore
CHANGED
|
@@ -1,2 +1 @@
|
|
| 1 |
-
__pycache__
|
| 2 |
-
.idea
|
|
|
|
| 1 |
+
__pycache__
|
|
|
.idea/workspace.xml
CHANGED
|
@@ -5,6 +5,7 @@
|
|
| 5 |
</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$/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" />
|
|
@@ -25,12 +26,16 @@
|
|
| 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 |
"Python.app.executor": "Run",
|
| 35 |
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
| 36 |
"RunOnceActivity.ShowReadmeOnStart": "true",
|
|
@@ -65,13 +70,16 @@
|
|
| 65 |
<updated>1713919907805</updated>
|
| 66 |
<workItem from="1713919910236" duration="1099000" />
|
| 67 |
<workItem from="1713921043559" duration="495000" />
|
| 68 |
-
<workItem from="1714055653743" duration="
|
| 69 |
</task>
|
| 70 |
<servers />
|
| 71 |
</component>
|
| 72 |
<component name="TypeScriptGeneratedFilesManager">
|
| 73 |
<option name="version" value="3" />
|
| 74 |
</component>
|
|
|
|
|
|
|
|
|
|
| 75 |
<component name="com.intellij.coverage.CoverageDataManagerImpl">
|
| 76 |
<SUITE FILE_PATH="coverage/Text_Driven_Image_to_Image_Generation$app.coverage" NAME="app Coverage Results" MODIFIED="1714055835621" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
|
| 77 |
</component>
|
|
|
|
| 5 |
</component>
|
| 6 |
<component name="ChangeListManager">
|
| 7 |
<list default="true" id="d268fe54-cb43-4451-8f43-ce4d20d5699c" name="Changes" comment="">
|
| 8 |
+
<change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
|
| 9 |
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" 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" />
|
|
|
|
| 26 |
"associatedIndex": 1
|
| 27 |
}</component>
|
| 28 |
<component name="ProjectId" id="2fWbi11HVd4VaSJdU86hTIXVVnG" />
|
| 29 |
+
<component name="ProjectLevelVcsManager">
|
| 30 |
+
<ConfirmationsSetting value="2" id="Add" />
|
| 31 |
+
</component>
|
| 32 |
<component name="ProjectViewState">
|
| 33 |
<option name="hideEmptyMiddlePackages" value="true" />
|
| 34 |
<option name="showLibraryContents" value="true" />
|
| 35 |
</component>
|
| 36 |
<component name="PropertiesComponent"><![CDATA[{
|
| 37 |
"keyToString": {
|
| 38 |
+
"ASKED_ADD_EXTERNAL_FILES": "true",
|
| 39 |
"Python.app.executor": "Run",
|
| 40 |
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
| 41 |
"RunOnceActivity.ShowReadmeOnStart": "true",
|
|
|
|
| 70 |
<updated>1713919907805</updated>
|
| 71 |
<workItem from="1713919910236" duration="1099000" />
|
| 72 |
<workItem from="1713921043559" duration="495000" />
|
| 73 |
+
<workItem from="1714055653743" duration="1152000" />
|
| 74 |
</task>
|
| 75 |
<servers />
|
| 76 |
</component>
|
| 77 |
<component name="TypeScriptGeneratedFilesManager">
|
| 78 |
<option name="version" value="3" />
|
| 79 |
</component>
|
| 80 |
+
<component name="VcsManagerConfiguration">
|
| 81 |
+
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
|
| 82 |
+
</component>
|
| 83 |
<component name="com.intellij.coverage.CoverageDataManagerImpl">
|
| 84 |
<SUITE FILE_PATH="coverage/Text_Driven_Image_to_Image_Generation$app.coverage" NAME="app Coverage Results" MODIFIED="1714055835621" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
|
| 85 |
</component>
|
Kaggle_API.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
import time
|
| 2 |
|
| 3 |
from Helper_functions import *
|
| 4 |
-
|
| 5 |
|
| 6 |
class API_Connection:
|
| 7 |
-
def __init__(self, gd_connection
|
| 8 |
os.environ["KAGGLE_USERNAME"] = kaggle_username
|
| 9 |
os.environ["KAGGLE_KEY"] = kaggle_key
|
| 10 |
|
|
|
|
| 1 |
import time
|
| 2 |
|
| 3 |
from Helper_functions import *
|
| 4 |
+
|
| 5 |
|
| 6 |
class API_Connection:
|
| 7 |
+
def __init__(self, gd_connection, kaggle_username: str = "", kaggle_key: str = ""):
|
| 8 |
os.environ["KAGGLE_USERNAME"] = kaggle_username
|
| 9 |
os.environ["KAGGLE_KEY"] = kaggle_key
|
| 10 |
|
app.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
import os
|
| 2 |
import math
|
| 3 |
import gradio as gr
|
| 4 |
-
import time
|
| 5 |
from Helper_functions import *
|
| 6 |
from Kaggle_API import API_Connection
|
| 7 |
from GoogleDrive_API import GoogleDrive_API
|
|
@@ -52,8 +51,9 @@ def generate_button_clicked(*args):
|
|
| 52 |
if len(edit_instruction) == 0:
|
| 53 |
raise gr.Error("Missing Input: edit_instruction")
|
| 54 |
|
| 55 |
-
|
| 56 |
-
#
|
|
|
|
| 57 |
api_connection = API_Connection(GoogleDrive_connection, kaggle_username, kaggle_key)
|
| 58 |
|
| 59 |
create_folder("local_dataset")
|
|
|
|
| 1 |
import os
|
| 2 |
import math
|
| 3 |
import gradio as gr
|
|
|
|
| 4 |
from Helper_functions import *
|
| 5 |
from Kaggle_API import API_Connection
|
| 6 |
from GoogleDrive_API import GoogleDrive_API
|
|
|
|
| 51 |
if len(edit_instruction) == 0:
|
| 52 |
raise gr.Error("Missing Input: edit_instruction")
|
| 53 |
|
| 54 |
+
GoogleDrive_connection_Path = ""
|
| 55 |
+
# GoogleDrive_connection_Path = "service_account.json"
|
| 56 |
+
GoogleDrive_connection = GoogleDrive_API(GoogleDrive_connection_Path)
|
| 57 |
api_connection = API_Connection(GoogleDrive_connection, kaggle_username, kaggle_key)
|
| 58 |
|
| 59 |
create_folder("local_dataset")
|