ECUiVADE commited on
Commit
fb433e8
1 Parent(s): d0e122e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -17,9 +17,9 @@ from huggingface_hub import snapshot_download
17
  repo_name = 'TheBloke/OpenHermes-2.5-Mistral-7B-GGUF'
18
  model_file = "openhermes-2.5-mistral-7b.Q4_K_M.gguf"
19
 
20
- print('Fetching model:', repo_name, model_file)
21
- snapshot_download(repo_id=repo_name, local_dir=".", allow_patterns=model_file)
22
- print('Done fetching model:')
23
 
24
  DEFAULT_MODEL_PATH = model_file
25
 
@@ -58,8 +58,8 @@ Age=""
58
 
59
  chat_log_name =""
60
 
61
- from llama_cpp import Llama
62
- llm = Llama(model_path=model_file, model_type="mistral",n_gpu_layers=-1,n_ctx = 2048)
63
 
64
 
65
  def reset_chat():
@@ -196,6 +196,8 @@ chat_bot=gr.ChatInterface(
196
  chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, layout="panel"),
197
  title="""AI Chat Bot - ECU IVADE"""
198
  )
 
 
199
 
200
  def name_interface(name,occupation,ethnicity,gender,age):
201
  global Name, Occupation,Ethnicity,Gender,Age,chat_log_name
@@ -219,7 +221,7 @@ name_interface = gr.Interface(
219
  gr.Textbox(label="Name", placeholder="Enter your name here..."),
220
  gr.Textbox(label="Occupation", placeholder="Enter your occupation here..."),
221
  gr.Textbox(label="Ethnicity", placeholder="Enter your Ethnicity here..."),
222
- gr.Textbox(label="Gender", placeholder="Enter your Gender here..."),
223
  gr.Textbox(label="Age", placeholder="Enter your Age here...")
224
  ],outputs="text",
225
  title="ECU-IVADE : User Information",
 
17
  repo_name = 'TheBloke/OpenHermes-2.5-Mistral-7B-GGUF'
18
  model_file = "openhermes-2.5-mistral-7b.Q4_K_M.gguf"
19
 
20
+ #print('Fetching model:', repo_name, model_file)
21
+ #snapshot_download(repo_id=repo_name, local_dir=".", allow_patterns=model_file)
22
+ #print('Done fetching model:')
23
 
24
  DEFAULT_MODEL_PATH = model_file
25
 
 
58
 
59
  chat_log_name =""
60
 
61
+ #from llama_cpp import Llama
62
+ #llm = Llama(model_path=model_file, model_type="mistral",n_gpu_layers=-1,n_ctx = 2048)
63
 
64
 
65
  def reset_chat():
 
196
  chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, layout="panel"),
197
  title="""AI Chat Bot - ECU IVADE"""
198
  )
199
+ def blank():
200
+ print("Success")
201
 
202
  def name_interface(name,occupation,ethnicity,gender,age):
203
  global Name, Occupation,Ethnicity,Gender,Age,chat_log_name
 
221
  gr.Textbox(label="Name", placeholder="Enter your name here..."),
222
  gr.Textbox(label="Occupation", placeholder="Enter your occupation here..."),
223
  gr.Textbox(label="Ethnicity", placeholder="Enter your Ethnicity here..."),
224
+ gr.Dropdown(choices=["Male", "Female", "Other"], label="Gender"),
225
  gr.Textbox(label="Age", placeholder="Enter your Age here...")
226
  ],outputs="text",
227
  title="ECU-IVADE : User Information",