gojiteji commited on
Commit
7fe9dd8
1 Parent(s): adddd73

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -6
app.py CHANGED
@@ -43,9 +43,14 @@ def greet(modelpath1="",modelpath2="",modelpath3="",modelpath4="",modelpath5="")
43
  },
44
  ],
45
  )
46
- response_text = respose["choices"][0]["message"]["content"]
 
 
 
 
47
  # get the first | to the last |
48
- response_text = response_text[response_text.find("|")+1:response_text.rfind("|")+1]
 
49
 
50
 
51
  return response_text
@@ -53,10 +58,11 @@ def greet(modelpath1="",modelpath2="",modelpath3="",modelpath4="",modelpath5="")
53
  text1 = gr.inputs.Textbox(placeholder="ower/modelname1", label="Input modelname like rinna/japanese-gpt-neox-3.6b",lines=1,optional=False)
54
  text2 = gr.inputs.Textbox(placeholder="ower/modelname2", label="model 2",lines=1,optional=False)
55
  text3 = gr.inputs.Textbox(placeholder="ower/modelname3", label="model 3",lines=1,optional=True)
 
56
 
57
  if __name__ == '__main__':
58
  interFace = gr.Interface(fn=greet,
59
- inputs=[text1,text2,text3],
60
  outputs=[gr.Markdown(value="")],
61
  title="LLM Comparer⚖️",
62
  description="Plsease copy and paste the owner name / model name from the Hugging Face model hub.",
@@ -65,6 +71,4 @@ if __name__ == '__main__':
65
  )
66
 
67
  interFace.launch(share=False)
68
-
69
-
70
-
 
43
  },
44
  ],
45
  )
46
+ response_text = ""
47
+ for i in index_to_ignore:
48
+ response_text += "- **⚠️Config file inaccessible:** " + names[i] +"\n"
49
+
50
+ table_text = respose["choices"][0]["message"]["content"]
51
  # get the first | to the last |
52
+ response_text += "\n"+table_text[table_text.find("|")+1:table_text.rfind("|")+1]
53
+
54
 
55
 
56
  return response_text
 
58
  text1 = gr.inputs.Textbox(placeholder="ower/modelname1", label="Input modelname like rinna/japanese-gpt-neox-3.6b",lines=1,optional=False)
59
  text2 = gr.inputs.Textbox(placeholder="ower/modelname2", label="model 2",lines=1,optional=False)
60
  text3 = gr.inputs.Textbox(placeholder="ower/modelname3", label="model 3",lines=1,optional=True)
61
+ text4 = gr.inputs.Textbox(placeholder="ower/modelname4", label="model 4",lines=1,optional=True)
62
 
63
  if __name__ == '__main__':
64
  interFace = gr.Interface(fn=greet,
65
+ inputs=[text1,text2,text3,text4],
66
  outputs=[gr.Markdown(value="")],
67
  title="LLM Comparer⚖️",
68
  description="Plsease copy and paste the owner name / model name from the Hugging Face model hub.",
 
71
  )
72
 
73
  interFace.launch(share=False)
74
+