Skeleton UI
This commit is contained in:
commit
970f504cdd
51
config/config.yml
Executable file
51
config/config.yml
Executable file
@ -0,0 +1,51 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
UI:
|
||||||
|
theme: dark
|
||||||
|
font_size: 12
|
||||||
|
language: en
|
||||||
|
|
||||||
|
AI_Models:
|
||||||
|
Image_Prompt_Generation:
|
||||||
|
model: gpt-4
|
||||||
|
system_prompt: "You are a prompt generation expert. Generate clear and concise prompts based on user input."
|
||||||
|
temperature: 0.7
|
||||||
|
max_tokens: 1500
|
||||||
|
Image_model_to_use:
|
||||||
|
model: stable-diffusion-v1-4
|
||||||
|
guidance_scale: 7.5
|
||||||
|
num_inference_steps: 50
|
||||||
|
height: 512
|
||||||
|
width: 512
|
||||||
|
Image_Editing:
|
||||||
|
model: stable-diffusion-inpainting
|
||||||
|
guidance_scale: 7.5
|
||||||
|
num_inference_steps: 50
|
||||||
|
height: 512
|
||||||
|
width: 512
|
||||||
|
Video_Generation:
|
||||||
|
model: video-diffusion-model
|
||||||
|
guidance_scale: 7.5
|
||||||
|
num_inference_steps: 50
|
||||||
|
frame_rate: 24
|
||||||
|
resolution: 720p
|
||||||
|
Analyzer_Model:
|
||||||
|
model: gpt-4
|
||||||
|
system_prompt: "You are an expert image and video analyzer. Provide detailed descriptions and analyses."
|
||||||
|
temperature: 0.7
|
||||||
|
max_tokens: 1500
|
||||||
|
|
||||||
|
API_Endpoints:
|
||||||
|
LLM_Provider: "OpenAI Compatible"
|
||||||
|
Image_Generation_Provider: "ComfyUI API"
|
||||||
|
Image_Editing_Provider: "ComfyUI API"
|
||||||
|
Video_Generation_Provider: "ComfyUI API"
|
||||||
|
Analyzer_Provider: "OpenAI Compatible"
|
||||||
|
API_Keys:
|
||||||
|
OpenAI_API_Key: "your_openai_api_key_here"
|
||||||
|
ComfyUI_API_Key: "your_comfyui_api_key_here"
|
||||||
|
Endpoints:
|
||||||
|
OpenAI_Endpoint: "https://api.openai.com/v1"
|
||||||
|
OpenAI_Compatible_Endpoint: "https://localhost:port/v1"
|
||||||
|
ComfyUI_Endpoint: "http://localhost:8188/api/v1"
|
||||||
|
|
||||||
12
main.py
Executable file
12
main.py
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
import sys
|
||||||
|
from PyQt6.QtWidgets import QApplication
|
||||||
|
from src.ui import MainWindow
|
||||||
|
|
||||||
|
def main():
|
||||||
|
app = QApplication(sys.argv)
|
||||||
|
window = MainWindow()
|
||||||
|
window.show()
|
||||||
|
sys.exit(app.exec())
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
0
pyproject.toml
Executable file
0
pyproject.toml
Executable file
0
requirements.txt
Executable file
0
requirements.txt
Executable file
0
src/__init__.py
Executable file
0
src/__init__.py
Executable file
BIN
src/__pycache__/__init__.cpython-312.pyc
Executable file
BIN
src/__pycache__/__init__.cpython-312.pyc
Executable file
Binary file not shown.
BIN
src/__pycache__/settings.cpython-312.pyc
Executable file
BIN
src/__pycache__/settings.cpython-312.pyc
Executable file
Binary file not shown.
BIN
src/__pycache__/ui.cpython-312.pyc
Executable file
BIN
src/__pycache__/ui.cpython-312.pyc
Executable file
Binary file not shown.
BIN
src/__pycache__/utils.cpython-312.pyc
Executable file
BIN
src/__pycache__/utils.cpython-312.pyc
Executable file
Binary file not shown.
0
src/api_client.py
Executable file
0
src/api_client.py
Executable file
14
src/settings.py
Executable file
14
src/settings.py
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
from PyQt6.QtWidgets import QMainWindow, QWidget, QVBoxLayout, QLabel
|
||||||
|
|
||||||
|
class SettingsWindow(QMainWindow):
|
||||||
|
def __init__(self):
|
||||||
|
super().__init__()
|
||||||
|
self.setWindowTitle("Settings")
|
||||||
|
self.setGeometry(200, 200, 400, 300)
|
||||||
|
|
||||||
|
# Placeholder content
|
||||||
|
layout = QVBoxLayout()
|
||||||
|
layout.addWidget(QLabel("Settings will be implemented here"))
|
||||||
|
widget = QWidget()
|
||||||
|
widget.setLayout(layout)
|
||||||
|
self.setCentralWidget(widget)
|
||||||
133
src/ui.py
Executable file
133
src/ui.py
Executable file
@ -0,0 +1,133 @@
|
|||||||
|
import sys
|
||||||
|
from PyQt6.QtWidgets import (
|
||||||
|
QMainWindow, QWidget, QVBoxLayout, QHBoxLayout, QPushButton,
|
||||||
|
QLabel, QLineEdit, QTextEdit, QMenuBar, QMenu, QStatusBar
|
||||||
|
)
|
||||||
|
from PyQt6.QtCore import Qt, QTimer
|
||||||
|
from PyQt6.QtGui import QColor, QPalette
|
||||||
|
|
||||||
|
from src.settings import SettingsWindow
|
||||||
|
|
||||||
|
class MainWindow(QMainWindow):
|
||||||
|
def __init__(self):
|
||||||
|
super().__init__()
|
||||||
|
self.setWindowTitle("DOMYWO - The Lazy Social Media Creator")
|
||||||
|
self.setGeometry(100, 100, 800, 600)
|
||||||
|
|
||||||
|
# Create central widget and layout
|
||||||
|
central_widget = QWidget()
|
||||||
|
self.setCentralWidget(central_widget)
|
||||||
|
main_layout = QVBoxLayout(central_widget)
|
||||||
|
|
||||||
|
# Status bar for logging
|
||||||
|
self.status_bar = QStatusBar()
|
||||||
|
self.setStatusBar(self.status_bar)
|
||||||
|
|
||||||
|
# Create menu bar
|
||||||
|
menubar = self.menuBar()
|
||||||
|
program_menu = menubar.addMenu("&DOMYWO")
|
||||||
|
settings_menu = menubar.addMenu("&Settings")
|
||||||
|
about_menu = menubar.addMenu("&About")
|
||||||
|
|
||||||
|
# Connect menu actions
|
||||||
|
settings_action = settings_menu.addAction("Settings")
|
||||||
|
settings_action.triggered.connect(self.open_settings)
|
||||||
|
|
||||||
|
# Start button and status
|
||||||
|
start_layout = QHBoxLayout()
|
||||||
|
self.start_button = QPushButton("Start")
|
||||||
|
self.start_button.clicked.connect(self.toggle_start)
|
||||||
|
self.start_status = QLabel("Ready")
|
||||||
|
self.start_status.setFixedHeight(25)
|
||||||
|
self.update_status_color(self.start_status, "Ready")
|
||||||
|
|
||||||
|
start_layout.addWidget(self.start_button)
|
||||||
|
start_layout.addWidget(self.start_status)
|
||||||
|
start_layout.addStretch()
|
||||||
|
|
||||||
|
main_layout.addLayout(start_layout)
|
||||||
|
|
||||||
|
# LLM Prompt Generation section
|
||||||
|
main_layout.addWidget(QLabel("LLM Prompt Generation"))
|
||||||
|
self.llm_prompt_status = self.create_status_field("Ready")
|
||||||
|
main_layout.addWidget(self.llm_prompt_status)
|
||||||
|
|
||||||
|
# Frame Generation section
|
||||||
|
main_layout.addWidget(QLabel("Start Frame Generation"))
|
||||||
|
self.frame_generation_status = self.create_status_field("Ready")
|
||||||
|
main_layout.addWidget(self.frame_generation_status)
|
||||||
|
|
||||||
|
# End Frame Generation section
|
||||||
|
main_layout.addWidget(QLabel("End Frame Generation"))
|
||||||
|
self.end_frame_status = self.create_status_field("Ready")
|
||||||
|
main_layout.addWidget(self.end_frame_status)
|
||||||
|
|
||||||
|
# Analyze Images section
|
||||||
|
main_layout.addWidget(QLabel("Analyze Images and prompt Video"))
|
||||||
|
self.analyze_status = self.create_status_field("Ready")
|
||||||
|
main_layout.addWidget(self.analyze_status)
|
||||||
|
|
||||||
|
# Image/video display area
|
||||||
|
self.image_display = QLabel("Generated content will appear here")
|
||||||
|
self.image_display.setFixedHeight(200)
|
||||||
|
self.image_display.setStyleSheet("border: 1px solid gray;")
|
||||||
|
main_layout.addWidget(self.image_display)
|
||||||
|
|
||||||
|
# Log window
|
||||||
|
main_layout.addWidget(QLabel("Log"))
|
||||||
|
self.log_window = QTextEdit()
|
||||||
|
self.log_window.setReadOnly(True)
|
||||||
|
self.log_window.setMaximumHeight(150)
|
||||||
|
main_layout.addWidget(self.log_window)
|
||||||
|
|
||||||
|
# Timer for status simulation
|
||||||
|
self.timer = QTimer()
|
||||||
|
self.timer.timeout.connect(self.simulate_progress)
|
||||||
|
self.timer.start(2000) # Update every 2 seconds
|
||||||
|
|
||||||
|
def create_status_field(self, initial_status):
|
||||||
|
layout = QHBoxLayout()
|
||||||
|
run_button = QPushButton("Run this Step only")
|
||||||
|
status_field = QLineEdit()
|
||||||
|
status_field.setReadOnly(True)
|
||||||
|
status_field.setText(initial_status)
|
||||||
|
status_field.setFixedHeight(25)
|
||||||
|
self.update_status_color(status_field, initial_status)
|
||||||
|
|
||||||
|
layout.addWidget(run_button)
|
||||||
|
layout.addWidget(status_field)
|
||||||
|
layout.addStretch()
|
||||||
|
|
||||||
|
container = QWidget()
|
||||||
|
container.setLayout(layout)
|
||||||
|
return container
|
||||||
|
|
||||||
|
def update_status_color(self, field, status):
|
||||||
|
palette = field.palette()
|
||||||
|
if "Running" in status:
|
||||||
|
palette.setColor(QPalette.ColorRole.Text, QColor("yellow"))
|
||||||
|
elif "Error" in status:
|
||||||
|
palette.setColor(QPalette.ColorRole.Text, QColor("red"))
|
||||||
|
else:
|
||||||
|
palette.setColor(QPalette.ColorRole.Text, QColor("green"))
|
||||||
|
field.setPalette(palette)
|
||||||
|
|
||||||
|
def toggle_start(self):
|
||||||
|
if self.start_button.text() == "Start":
|
||||||
|
self.start_button.setText("Stop")
|
||||||
|
self.start_status.setText("Running")
|
||||||
|
self.update_status_color(self.start_status, "Running")
|
||||||
|
self.log_window.append("Process started")
|
||||||
|
else:
|
||||||
|
self.start_button.setText("Start")
|
||||||
|
self.start_status.setText("Ready")
|
||||||
|
self.update_status_color(self.start_status, "Ready")
|
||||||
|
self.log_window.append("Process stopped")
|
||||||
|
|
||||||
|
def simulate_progress(self):
|
||||||
|
# This is just a simulation - in real app you'd update from actual processes
|
||||||
|
pass
|
||||||
|
|
||||||
|
def open_settings(self):
|
||||||
|
self.settings_window = SettingsWindow()
|
||||||
|
self.settings_window.show()
|
||||||
6
src/utils.py
Executable file
6
src/utils.py
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
import yaml
|
||||||
|
|
||||||
|
class Settings_helper_fn:
|
||||||
|
def __init__(self, settings_file='config.yml'):
|
||||||
|
self.settings_file = settings_file
|
||||||
|
self.settings = self.load_settings()
|
||||||
0
tests/__init__.py
Executable file
0
tests/__init__.py
Executable file
0
tests/test_api_client.py
Executable file
0
tests/test_api_client.py
Executable file
Loading…
x
Reference in New Issue
Block a user