Zahnanni commited on
Commit
aa9bcdd
·
1 Parent(s): 8aa9af0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -16,9 +16,9 @@ model_standardform = keras.models.load_model("TRIALsequencingmodel.h5")
16
  model_dialect = keras.models.load_model("dialect_guessing.h5")
17
 
18
  def prediction(input):
19
- output_standardform = model_standardform.predict(input)
20
  output_dialect = model_dialect.predict(input)
21
- return(output_standardform, output_dialect)
22
 
23
  desc = "Did you encounter a Finnish dialect or slang word and you cannot find it in a dictionary? This translator predicts the Finnish standard form of the word to enable you to check those words in your usual Finnish sources! Try it out! But, it needs to be stated that not all predictions will be right, although maybe still helpful..."
24
 
@@ -28,5 +28,7 @@ desc = "Did you encounter a Finnish dialect or slang word and you cannot find it
28
 
29
 
30
 
31
- demo = gr.Interface(fn=prediction , inputs = gr.Textbox(placeholder="Write a Finnish slang or dialct word here."), outputs = [gr.Textbox(placeholder="This is the predicted Finnish standard form of the word."), gr.Textbox(placeholder="This is the predicted location where the word may be used.")], title = "Local Finnish Translator", description = desc)
32
  demo.launch()
 
 
 
16
  model_dialect = keras.models.load_model("dialect_guessing.h5")
17
 
18
  def prediction(input):
19
+ #output_standardform = model_standardform.predict(input)
20
  output_dialect = model_dialect.predict(input)
21
+ return(output_dialect)
22
 
23
  desc = "Did you encounter a Finnish dialect or slang word and you cannot find it in a dictionary? This translator predicts the Finnish standard form of the word to enable you to check those words in your usual Finnish sources! Try it out! But, it needs to be stated that not all predictions will be right, although maybe still helpful..."
24
 
 
28
 
29
 
30
 
31
+ demo = gr.Interface(fn=prediction , inputs = gr.Textbox(placeholder="Write a Finnish slang or dialct word here."), outputs = gr.Textbox(placeholder="This is the predicted location where the word may be used."), title = "Local Finnish Translator", description = desc)
32
  demo.launch()
33
+
34
+ #gr.Textbox(placeholder="This is the predicted Finnish standard form of the word."),