Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create windows release, improve styling #1981

Merged
merged 1 commit into from
May 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,10 @@ docker run -p 8080:8080 -p 1337:1337 -p 7900:7900 --shm-size="2g" -v ${PWD}/har_

#### Installation Guide for Windows (.exe)
To ensure the seamless operation of our application, please follow the instructions below. These steps are designed to guide you through the installation process on Windows operating systems.
##### Prerequisites
1. **WebView2 Runtime**: Our application requires the *WebView2 Runtime* to be installed on your system. If you do not have it installed, please download and install it from the [Microsoft Developer Website](https://developer.microsoft.com/en-us/microsoft-edge/webview2/). If you already have *WebView2 Runtime* installed but are encountering issues, navigate to *Installed Windows Apps*, select *WebView2*, and opt for the repair option.
##### Installation Steps
2. **Download the Application**: Visit our [latest releases page](https://github.com/xtekky/gpt4free/releases/latest) and download the most recent version of the application, named `g4f.webview.*.exe`.
3. **File Placement**: Once downloaded, transfer the `.exe` file from your downloads folder to a directory of your choice on your system, and then execute it to run the app.
##### Post-Installation Adjustment
### Installation Steps
hlohaus marked this conversation as resolved.
Show resolved Hide resolved
1. **Download the Application**: Visit our [latest releases page](https://github.com/xtekky/gpt4free/releases/latest) and download the most recent version of the application, named `g4f.exe.zip`.
hlohaus marked this conversation as resolved.
Show resolved Hide resolved
2. **File Placement**: After downloading, locate the `.zip` file in your Downloads folder. Unpack it to a directory of your choice on your system, then execute the `g4f.exe` file to run the app.
hlohaus marked this conversation as resolved.
Show resolved Hide resolved
3. **Open GUI**: The app starts a web server with the GUI. Open your favorite browser and navigate to `http://localhost:8080/chat/` to access the application interface.
hlohaus marked this conversation as resolved.
Show resolved Hide resolved
4. **Firewall Configuration (Hotfix)**: Upon installation, it may be necessary to adjust your Windows Firewall settings to allow the application to operate correctly. To do this, access your Windows Firewall settings and allow the application.
hlohaus marked this conversation as resolved.
Show resolved Hide resolved

By following these steps, you should be able to successfully install and run the application on your Windows system. If you encounter any issues during the installation process, please refer to our Issue Tracker or try to get contact over Discord for assistance.
Expand Down
35 changes: 20 additions & 15 deletions g4f/gui/client/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
--user-input: #ac87bb;
--conversations: #c7a2ff;
--conversations-hover: #c7a2ff4d;
--scrollbar: var(--colour-3);
--scrollbar-thumb: var(--blur-bg);
}

:root {
Expand Down Expand Up @@ -379,7 +381,10 @@ body {
z-index: 1000;
display: none;
cursor: pointer;
filter: grayscale(1) invert(1);
}

.message .user .fa-xmark {
color: var(--colour-1);
}

.message .count .fa-clipboard,
Expand All @@ -389,10 +394,6 @@ body {
cursor: pointer;
}

.message .user .fa-xmark {
color: var(--colour-1);
}

.message .count .fa-clipboard {
color: var(--colour-3);
}
Expand Down Expand Up @@ -697,6 +698,7 @@ select {
background: transparent;
cursor: pointer;
height: 49px;
color: var(--colour-3);
}

@media only screen and (min-width: 40em) {
Expand Down Expand Up @@ -1003,6 +1005,16 @@ a:-webkit-any-link {
--conversations: #0062cc;
--colour-1: #ffffff;
--colour-3: #212529;
--scrollbar: var(--colour-1);
--scrollbar-thumb: var(--gradient);
}

.white .message .assistant .fa-xmark {
color: var(--colour-1);
}

.white .message .user .fa-xmark {
color: var(--colour-3);
}

#send-button {
Expand Down Expand Up @@ -1072,15 +1084,12 @@ a:-webkit-any-link {
white-space:nowrap;
}

::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
background: var(--colour-3);
background: var(--scrollbar);
}
::-webkit-scrollbar-thumb {
background: var(--blur-bg);
border-radius: 5px;
background: var(--scrollbar-thumb);
border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--accent);
Expand All @@ -1100,10 +1109,6 @@ a:-webkit-any-link {
max-height: 200px;
}

#message-input::-webkit-scrollbar {
width: 5px;
}

.hidden {
display: none;
}
Expand Down
2 changes: 1 addition & 1 deletion projects/windows/copy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cp -r * /var/win/shared/
hlohaus marked this conversation as resolved.
Show resolved Hide resolved
cp -r windows/* /var/win/shared/
cp -r projects/windows/* /var/win/shared/
hlohaus marked this conversation as resolved.
Show resolved Hide resolved
cp setup.py /var/win/shared/
cp README.md /var/win/shared/
#git clone https://github.com/pyinstaller/pyinstaller/ /var/win/shared/pyinstaller
hlohaus marked this conversation as resolved.
Show resolved Hide resolved
9 changes: 3 additions & 6 deletions projects/windows/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@
cafile=certifi.where()
)

from g4f.gui.webview import run_webview
from g4f.gui.run import gui_parser
from g4f.gui.run import run_gui_args, gui_parser
import g4f.debug
g4f.debug.version_check = False
hlohaus marked this conversation as resolved.
Show resolved Hide resolved
g4f.debug.version = "0.2.8.0"
g4f.debug.version = "0.3.1.7"

if __name__ == "__main__":
parser = gui_parser()
args = parser.parse_args()
hlohaus marked this conversation as resolved.
Show resolved Hide resolved
if args.debug:
g4f.debug.logging = True
run_webview(args.debug)
run_gui_args(args)
4 changes: 2 additions & 2 deletions projects/windows/main.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ a = Analysis(
pathex=[],
binaries=[],
datas=[],
hiddenimports=['plyer.platforms.linux.filechooser', 'plyer.platforms.win.filechooser'],
hiddenimports=[],
hlohaus marked this conversation as resolved.
Show resolved Hide resolved
hookspath=[],
hooksconfig={},
runtime_hooks=[],
Expand Down Expand Up @@ -42,4 +42,4 @@ coll = COLLECT(
upx=True,
upx_exclude=[],
name='g4f',
hlohaus marked this conversation as resolved.
Show resolved Hide resolved
)
)
Loading