diogocarapito commited on
Commit
3bbfa05
·
1 Parent(s): 3eb0d4d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -1,7 +1,12 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
- pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-en-es")
 
 
 
 
 
5
 
6
  def predict(text):
7
  return pipe(text)[0]["translation_text"]
@@ -13,5 +18,5 @@ iface = gr.Interface(
13
  examples=[["Hello! My name is Omar"]]
14
  )
15
 
16
- iface.launch()
17
 
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
+ gr.Interface.load("models/deepset/roberta-base-squad2-distilled").launch()
5
+
6
+ '''
7
+ modes_name = "deepset/roberta-base-squad2"
8
+
9
+ pipe = pipeline("question-answering", model=model_name, tokenizer=model_name)
10
 
11
  def predict(text):
12
  return pipe(text)[0]["translation_text"]
 
18
  examples=[["Hello! My name is Omar"]]
19
  )
20
 
21
+ iface.launch()'''
22