VideoAditor commited on
Commit
710169e
1 Parent(s): 3ff0cf3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -1,9 +1,12 @@
1
  import os
2
  import sys
 
 
3
  os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
4
  os.environ['GRADIO_ANALYTICS_ENABLED'] = '0'
5
- sys.path.insert(0, os.getcwd())
6
- sys.path.append(os.path.join(os.path.dirname(__file__), 'sd-scripts'))
 
7
  import subprocess
8
  import gradio as gr
9
  from PIL import Image
@@ -16,13 +19,15 @@ from slugify import slugify
16
  from transformers import AutoProcessor, AutoModelForCausalLM
17
  from gradio_logsview import LogsView, LogsViewRunner
18
  from huggingface_hub import hf_hub_download, HfApi
19
- from library import flux_train_utils, huggingface_util
20
  from argparse import Namespace
21
- import train_network
22
  import toml
23
  import re
 
24
  MAX_IMAGES = 150
25
 
 
26
  with open('models.yaml', 'r') as file:
27
  models = yaml.safe_load(file)
28
 
 
1
  import os
2
  import sys
3
+
4
+ # Environment variables
5
  os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
6
  os.environ['GRADIO_ANALYTICS_ENABLED'] = '0'
7
+
8
+ # No need to adjust sys.path if using proper module imports
9
+
10
  import subprocess
11
  import gradio as gr
12
  from PIL import Image
 
19
  from transformers import AutoProcessor, AutoModelForCausalLM
20
  from gradio_logsview import LogsView, LogsViewRunner
21
  from huggingface_hub import hf_hub_download, HfApi
22
+ from fluxgym_main.library import flux_train_utils, huggingface_util
23
  from argparse import Namespace
24
+ from fluxgym_main import train_network
25
  import toml
26
  import re
27
+
28
  MAX_IMAGES = 150
29
 
30
+
31
  with open('models.yaml', 'r') as file:
32
  models = yaml.safe_load(file)
33