bubuuunel commited on
Commit
dcf16ce
1 Parent(s): a67a018

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -108,6 +108,7 @@ def predict(user_input,company):
108
 
109
  # Create messages
110
  try:
 
111
  response = client.chat.completions.create(
112
  model=model_name,
113
  messages=prompt,
@@ -122,7 +123,9 @@ def predict(user_input,company):
122
 
123
 
124
  # Get response from the LLM
125
-
 
 
126
 
127
  # While the prediction is made, log both the inputs and outputs to a local log file
128
  # While writing to the log file, ensure that the commit scheduler is locked to avoid parallel
@@ -148,7 +151,7 @@ company_input = gr.Radio(
148
  label = 'company'
149
  )
150
 
151
- model_output = gr.Label (label = 'Response')
152
 
153
  # Add text box and radio button to the interface
154
  # The radio button is used to select the company 10k report in which the context needs to be retrieved.
 
108
 
109
  # Create messages
110
  try:
111
+ model_name = "mistralai/Mixtral-8x7B-Instruct-v0.1"
112
  response = client.chat.completions.create(
113
  model=model_name,
114
  messages=prompt,
 
123
 
124
 
125
  # Get response from the LLM
126
+
127
+ model_output = predict(user_input,company)
128
+
129
 
130
  # While the prediction is made, log both the inputs and outputs to a local log file
131
  # While writing to the log file, ensure that the commit scheduler is locked to avoid parallel
 
151
  label = 'company'
152
  )
153
 
154
+ model_output = gr.Textbox (label = 'Response')
155
 
156
  # Add text box and radio button to the interface
157
  # The radio button is used to select the company 10k report in which the context needs to be retrieved.