AmirMoris commited on
Commit
9aa7219
·
1 Parent(s): b8ca183

firmatting

Browse files
Files changed (3) hide show
  1. .idea/workspace.xml +2 -1
  2. Kaggle_API.py +2 -6
  3. app.py +3 -7
.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$/app.py" beforeDir="false" afterPath="$PROJECT_DIR$/app.py" afterDir="false" />
10
  </list>
11
  <option name="SHOW_DIALOG" value="false" />
@@ -69,7 +70,7 @@
69
  <workItem from="1713919910236" duration="1099000" />
70
  <workItem from="1713921043559" duration="495000" />
71
  <workItem from="1714055653743" duration="2106000" />
72
- <workItem from="1714065328028" duration="990000" />
73
  </task>
74
  <servers />
75
  </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" />
11
  </list>
12
  <option name="SHOW_DIALOG" value="false" />
 
70
  <workItem from="1713919910236" duration="1099000" />
71
  <workItem from="1713921043559" duration="495000" />
72
  <workItem from="1714055653743" duration="2106000" />
73
+ <workItem from="1714065328028" duration="1316000" />
74
  </task>
75
  <servers />
76
  </component>
Kaggle_API.py CHANGED
@@ -70,12 +70,8 @@ class API_Connection:
70
  write_file(data, dataset_path, "data.json")
71
 
72
  # update dataset
73
- self.GoogleDrive_connection.upload_file(
74
- "data.json", rf"{self.DATASET_NAME}\data.json"
75
- )
76
- self.GoogleDrive_connection.upload_file(
77
- input_image_name, rf"{self.DATASET_NAME}\{input_image_name}"
78
- )
79
 
80
  # run notebook
81
  print(self.run(notebook_path))
 
70
  write_file(data, dataset_path, "data.json")
71
 
72
  # update dataset
73
+ self.GoogleDrive_connection.upload_file("data.json", rf"{self.DATASET_NAME}\data.json")
74
+ self.GoogleDrive_connection.upload_file(input_image_name, rf"{self.DATASET_NAME}\{input_image_name}")
 
 
 
 
75
 
76
  # run notebook
77
  print(self.run(notebook_path))
app.py CHANGED
@@ -98,16 +98,12 @@ def main():
98
  with gr.Blocks(theme="AmirMoris/GP_Themes") as demo:
99
  toggle_theme = gr.Button(value="Toggle Theme")
100
  with gr.Row():
101
- input_image = gr.Image(label="Input Image", type="pil", height=400, interactive=True)
102
- edited_image = gr.Image(
103
- label=f"Edited Image", type="pil", height=400, interactive=False
104
- )
105
 
106
  with gr.Row():
107
  with gr.Column(scale=3):
108
- instruction = gr.Textbox(
109
- lines=1, label="Edit Instruction", interactive=True
110
- )
111
  with gr.Column(scale=1, min_width=100):
112
  with gr.Row():
113
  generate_button = gr.Button("Generate")
 
98
  with gr.Blocks(theme="AmirMoris/GP_Themes") as demo:
99
  toggle_theme = gr.Button(value="Toggle Theme")
100
  with gr.Row():
101
+ input_image = gr.Image(label="Input Image", type="pil", interactive=True)
102
+ edited_image = gr.Image(label=f"Edited Image", type="pil", interactive=False)
 
 
103
 
104
  with gr.Row():
105
  with gr.Column(scale=3):
106
+ instruction = gr.Textbox(lines=1, label="Edit Instruction", interactive=True)
 
 
107
  with gr.Column(scale=1, min_width=100):
108
  with gr.Row():
109
  generate_button = gr.Button("Generate")