dondoesstuff commited on
Commit
1b303de
·
1 Parent(s): a6bbe79

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -1,8 +1,15 @@
 
1
  import gradio as gr
2
  from gpt4all import GPT4All
3
 
 
 
 
 
 
 
4
  # Load the GPT-4 model
5
- model = GPT4All(model_name='orca-mini-3b.ggmlv3.q4_0.bin')
6
 
7
  # Templates for the user prompts
8
  prompt_template = 'USER: {0}\nASSISTANT: '
 
1
+ import os
2
  import gradio as gr
3
  from gpt4all import GPT4All
4
 
5
+ # Get the current directory of the Python script
6
+ current_directory = os.path.dirname(os.path.abspath(__file__))
7
+
8
+ # Path to the model file
9
+ model_path = os.path.join(current_directory, 'orca-mini-3b.ggmlv3.q4_0.bin')
10
+
11
  # Load the GPT-4 model
12
+ model = GPT4All(model_name=model_path)
13
 
14
  # Templates for the user prompts
15
  prompt_template = 'USER: {0}\nASSISTANT: '