Commit ·
ea2d9f5
1
Parent(s): 0bc35a0
Sree
Browse files- app.py +3 -30
- requirements.txt +4 -3
app.py
CHANGED
|
@@ -1,37 +1,10 @@
|
|
| 1 |
-
#import gradio as gr
|
| 2 |
-
|
| 3 |
-
#description = "Story generation with GPT-2"
|
| 4 |
-
#title = "Generate your own story"
|
| 5 |
-
#examples = [["Adventurer is approached by a mysterious stranger in the tavern for a new quest."]]
|
| 6 |
-
|
| 7 |
-
#interface = gr.Interface.load("huggingface/pranavpsv/gpt2-genre-story-generator",
|
| 8 |
-
# description=description,
|
| 9 |
-
# examples=examples
|
| 10 |
-
#)
|
| 11 |
-
|
| 12 |
-
#interface.launch()
|
| 13 |
-
|
| 14 |
import gradio as gr
|
| 15 |
|
| 16 |
-
#gr.Interface.load("models/NousResearch/Yarn-Mistral-7b-128k").launch()
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 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 |
-
|
| 34 |
-
return {'cat': 0.3, 'dog': 0.7}
|
| 35 |
|
| 36 |
-
demo = gr.Interface(fn=image_classifier, inputs="image", outputs="label")
|
| 37 |
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
|
|
|
| 3 |
|
| 4 |
+
def greet(name):
|
| 5 |
+
return "Hello " + name
|
|
|
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
+
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
|
|
|
| 9 |
|
|
|
|
| 10 |
demo.launch()
|
requirements.txt
CHANGED
|
@@ -1,3 +1,4 @@
|
|
| 1 |
-
gradio
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
| 1 |
+
gradio
|
| 2 |
+
#==3.1.4
|
| 3 |
+
#transformers==4.20.1
|
| 4 |
+
#huggingface_hub==0.19.0
|