Commit
·
8ee2160
1
Parent(s):
5e07bcf
Sree
Browse files
app.py
CHANGED
|
@@ -15,16 +15,23 @@ import gradio as gr
|
|
| 15 |
|
| 16 |
#gr.Interface.load("models/NousResearch/Yarn-Mistral-7b-128k").launch()
|
| 17 |
|
| 18 |
-
description = "Story generation with GPT-2"
|
| 19 |
-
title = "Generate your own story"
|
| 20 |
-
examples = [["Adventurer is approached by a mysterious stranger in the tavern for a new quest."]]
|
| 21 |
|
| 22 |
#interface = gr.Interface.load("huggingface/pranavpsv/gpt2-genre-story-generator",
|
| 23 |
|
| 24 |
-
gr.Interface.load("models/NousResearch/Yarn-Mistral-7b-128k",
|
| 25 |
-
description=description,
|
| 26 |
-
examples=examples
|
| 27 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
-
|
|
|
|
| 30 |
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
#gr.Interface.load("models/NousResearch/Yarn-Mistral-7b-128k").launch()
|
| 17 |
|
| 18 |
+
#description = "Story generation with GPT-2"
|
| 19 |
+
#title = "Generate your own story"
|
| 20 |
+
#examples = [["Adventurer is approached by a mysterious stranger in the tavern for a new quest."]]
|
| 21 |
|
| 22 |
#interface = gr.Interface.load("huggingface/pranavpsv/gpt2-genre-story-generator",
|
| 23 |
|
| 24 |
+
#gr.Interface.load("models/NousResearch/Yarn-Mistral-7b-128k",
|
| 25 |
+
# description=description,
|
| 26 |
+
# examples=examples
|
| 27 |
+
#)
|
| 28 |
+
|
| 29 |
+
#interface.launch()
|
| 30 |
+
|
| 31 |
+
import gradio as gr
|
| 32 |
|
| 33 |
+
def image_classifier(inp):
|
| 34 |
+
return {'cat': 0.3, 'dog': 0.7}
|
| 35 |
|
| 36 |
+
demo = gr.Interface(fn=image_classifier, inputs="image", outputs="label")
|
| 37 |
+
demo.launch()
|