Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -66,7 +66,7 @@ def RunLegalModel(model, text):
|
|
66 |
imgclassifier = pettyfogger("ext-generation", model=model)
|
67 |
if image is not None:
|
68 |
description = pettyfogger(text)
|
69 |
-
return description
|
70 |
|
71 |
radio1 = gr.Radio(["microsoft/resnet-50", "google/vit-base-patch16-224", "apple/mobilevit-small"], value="microsoft/resnet-50", label="Select a Classifier", info="Image Classifier")
|
72 |
tab1 = gr.Interface(
|
@@ -108,15 +108,15 @@ tab4 = gr.Interface(
|
|
108 |
)
|
109 |
|
110 |
|
111 |
-
classifiertypes = ["umarbutler/open-australian-legal-
|
112 |
-
radio5 = gr.Radio(classifiertypes, value="umarbutler/open-australian-legal-
|
113 |
textinput5 = gr.Textbox(value="Under the purposes of Part 6 Division 2 of the Act, regulations may confer power on an applicant for")
|
114 |
|
115 |
|
116 |
tab5 = gr.Interface(
|
117 |
fn=RunLegalModel,
|
118 |
inputs=[radio5, textinput5],
|
119 |
-
outputs=[text],
|
120 |
)
|
121 |
|
122 |
demo = gr.TabbedInterface([tab1, tab2, tab3, tab4, tab5], ["Describe", "Estimage Age", "Speak", "Generate Image", "Aus. Legal"])
|
|
|
66 |
imgclassifier = pettyfogger("ext-generation", model=model)
|
67 |
if image is not None:
|
68 |
description = pettyfogger(text)
|
69 |
+
return description[0]['generated_text']
|
70 |
|
71 |
radio1 = gr.Radio(["microsoft/resnet-50", "google/vit-base-patch16-224", "apple/mobilevit-small"], value="microsoft/resnet-50", label="Select a Classifier", info="Image Classifier")
|
72 |
tab1 = gr.Interface(
|
|
|
108 |
)
|
109 |
|
110 |
|
111 |
+
classifiertypes = ["umarbutler/open-australian-legal-llm"]
|
112 |
+
radio5 = gr.Radio(classifiertypes, value="umarbutler/open-australian-legal-llm", label="Select", info="Legal Question")
|
113 |
textinput5 = gr.Textbox(value="Under the purposes of Part 6 Division 2 of the Act, regulations may confer power on an applicant for")
|
114 |
|
115 |
|
116 |
tab5 = gr.Interface(
|
117 |
fn=RunLegalModel,
|
118 |
inputs=[radio5, textinput5],
|
119 |
+
outputs=["text"],
|
120 |
)
|
121 |
|
122 |
demo = gr.TabbedInterface([tab1, tab2, tab3, tab4, tab5], ["Describe", "Estimage Age", "Speak", "Generate Image", "Aus. Legal"])
|