Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -26,8 +26,17 @@ print(tokenizer.decode(output[0]))
|
|
26 |
def generate(input_txt):
|
27 |
output = model.generate(input_ids, max_length=max_length, num_beams=5, do_sample=True, no_repeat_ngram_size=2, temperature=1.37, top_k=69, top_p=0.96)
|
28 |
print (output)
|
|
|
|
|
29 |
|
|
|
|
|
|
|
|
|
30 |
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
|
|
|
|
|
26 |
def generate(input_txt):
|
27 |
output = model.generate(input_ids, max_length=max_length, num_beams=5, do_sample=True, no_repeat_ngram_size=2, temperature=1.37, top_k=69, top_p=0.96)
|
28 |
print (output)
|
29 |
+
|
30 |
+
inputs= gr.inputs.Textbox(lines=7, placeholder="Enter the beginning of your mollywood movie idea and the നിർമ്മിത ബുദ്ധി will fill in the rest...")
|
31 |
|
32 |
+
#integrate a working translator later!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
33 |
+
#generator = output
|
34 |
+
#translator = gr.Interface.load("models/Helsinki-NLP/opus-mt-en-ml")
|
35 |
+
#gr.Series(generator, translator, inputs=gr.inputs.Textbox(lines=7, label="Input Text")).launch() # this demo generates text, then translates it to Malayalam, and outputs the final result.
|
36 |
|
37 |
+
interface = gr.Interface(fn=generate,
|
38 |
+
inputs=inputs,
|
39 |
+
outputs='text',
|
40 |
+
title='AI based Mollywood movie idea generator')
|
41 |
+
|
42 |
+
interface.launch()
|