Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -61,7 +61,13 @@ def ImageGenFromText(text, model):
|
|
61 |
print(image)
|
62 |
return image
|
63 |
|
64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
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")
|
66 |
tab1 = gr.Interface(
|
67 |
fn=guessanImage,
|
@@ -104,7 +110,7 @@ tab4 = gr.Interface(
|
|
104 |
|
105 |
classifiertypes = ["umarbutler/open-australian-legal-distilgpt2"]
|
106 |
radio5 = gr.Radio(classifiertypes, value="umarbutler/open-australian-legal-distilgpt2", label="Select", info="Legal Question")
|
107 |
-
textinput5 =
|
108 |
|
109 |
|
110 |
tab5 = gr.Interface(
|
|
|
61 |
print(image)
|
62 |
return image
|
63 |
|
64 |
+
@spaces.GPU
|
65 |
+
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(
|
73 |
fn=guessanImage,
|
|
|
110 |
|
111 |
classifiertypes = ["umarbutler/open-australian-legal-distilgpt2"]
|
112 |
radio5 = gr.Radio(classifiertypes, value="umarbutler/open-australian-legal-distilgpt2", 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(
|