ShebMichel commited on
Commit
2e9663a
·
verified ·
1 Parent(s): 838c132

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -11
app.py CHANGED
@@ -55,16 +55,16 @@ def load_model(model_name):
55
 
56
 
57
  def model_launch(input,first_model):
58
- return f"Model: {selected_output}\nResponse to: {input}"
59
- # geomodel_llm=load_model(selected_model)
60
- # template = "Instruction:\n{instruction}\n\nResponse:\n{response}"
61
- # prompt = template.format(
62
- # instruction=input,
63
- # response="",
64
- # )
65
- # out = geomodel_llm.generate(prompt, max_length=1024)
66
- # ind = out.index('Response') + len('Response')+2
67
- # return out[ind:]
68
 
69
  # Global variable to store loaded JSON data
70
  loaded_data = {}
@@ -222,7 +222,6 @@ with gr.Blocks() as iface:
222
  inputs=model_dropdown,
223
  outputs=selected_output
224
  )
225
- #select_button = gr.Button("Select Model", variant="primary")
226
 
227
  # Editable question text box
228
  with gr.Row():
 
55
 
56
 
57
  def model_launch(input,first_model):
58
+ #return f"Model: {selected_output}\nResponse to: {input}"
59
+ geomodel_llm=load_model(selected_output)
60
+ template = "Instruction:\n{instruction}\n\nResponse:\n{response}"
61
+ prompt = template.format(
62
+ instruction=input,
63
+ response="",
64
+ )
65
+ out = geomodel_llm.generate(prompt, max_length=1024)
66
+ ind = out.index('Response') + len('Response')+2
67
+ return out[ind:]
68
 
69
  # Global variable to store loaded JSON data
70
  loaded_data = {}
 
222
  inputs=model_dropdown,
223
  outputs=selected_output
224
  )
 
225
 
226
  # Editable question text box
227
  with gr.Row():