IBounhas commited on
Commit
8cba4ce
·
1 Parent(s): 2464608

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -57,7 +57,8 @@ response = requests.get(file_url)
57
 
58
  with open("model.pt", "wb") as f:
59
  f.write(response.content)
60
-
 
61
  # model_load_path = "model.pt"
62
  # model = BertForSTS()
63
  # model.load_state_dict(torch.load(model_load_path))
@@ -73,12 +74,12 @@ with open("model.pt", "wb") as f:
73
 
74
  # return sim
75
 
76
- # # Create a Gradio interface with a text input zone
77
- # iface = gr.Interface(
78
- # fn=analyze_text, # The function to be called with user input
79
- # inputs=[gr.Textbox(), gr.Textbox()],
80
- # outputs="text" # Display the result as text
81
- # )
82
 
83
  # # Launch the Gradio interface
84
  iface.launch()
 
57
 
58
  with open("model.pt", "wb") as f:
59
  f.write(response.content)
60
+ f.close()
61
+
62
  # model_load_path = "model.pt"
63
  # model = BertForSTS()
64
  # model.load_state_dict(torch.load(model_load_path))
 
74
 
75
  # return sim
76
 
77
+ # Create a Gradio interface with a text input zone
78
+ iface = gr.Interface(
79
+ fn=analyze_text, # The function to be called with user input
80
+ inputs=[gr.Textbox(), gr.Textbox()],
81
+ outputs="text" # Display the result as text
82
+ )
83
 
84
  # # Launch the Gradio interface
85
  iface.launch()