Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,17 +1,12 @@
|
|
1 |
-
from aitextgen import aitextgen
|
2 |
import gradio as gr
|
|
|
3 |
|
|
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
def ai_text(Input):
|
8 |
-
generated_text = ai.generate_one(max_length = 500, prompt = Input, no_repeat_ngram_size = 3) #repetition_penalty = 1.9)
|
9 |
-
#print(type(generated_text))
|
10 |
-
return generated_text
|
11 |
|
|
|
12 |
|
13 |
-
|
14 |
-
|
15 |
-
output_text = gr.outputs.Textbox()
|
16 |
-
iface=gr.Interface(ai_text,"textbox", output_text, title=title_,description=description_)#.launch()
|
17 |
-
iface.launch()
|
|
|
|
|
1 |
import gradio as gr
|
2 |
+
from gradio.mix import Series
|
3 |
|
4 |
+
description_ = "Kindly input text, submit, and the computer will predict subsequent words for your text input."
|
5 |
|
6 |
+
model1 = gr.Interface.load("huggingface/EleutherAI/gpt-neo-125M")
|
7 |
+
model2 = gr.Interface.load("huggingface/EleutherAI/gpt-neo-2.7B")
|
|
|
|
|
|
|
|
|
8 |
|
9 |
+
demo = gr.TabbedInterface([model1, model2], ["Model 1", "Model 2"])
|
10 |
|
11 |
+
if __name__ == "__main__":
|
12 |
+
demo.launch()
|
|
|
|
|
|