added logo, fixed BERT Q/A and added clear button for text fields
|
@ -1,91 +1,109 @@
|
||||||
{
|
{
|
||||||
"images" : [
|
"images" : [
|
||||||
{
|
{
|
||||||
|
"filename" : "Icon-App-20x20@2x.png",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"scale" : "2x",
|
"scale" : "2x",
|
||||||
"size" : "20x20"
|
"size" : "20x20"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "Icon-App-20x20@3x.png",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"scale" : "3x",
|
"scale" : "3x",
|
||||||
"size" : "20x20"
|
"size" : "20x20"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "Icon-App-29x29@2x.png",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"scale" : "2x",
|
"scale" : "2x",
|
||||||
"size" : "29x29"
|
"size" : "29x29"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "Icon-App-29x29@3x.png",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"scale" : "3x",
|
"scale" : "3x",
|
||||||
"size" : "29x29"
|
"size" : "29x29"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "Icon-App-40x40@2x.png",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"scale" : "2x",
|
"scale" : "2x",
|
||||||
"size" : "40x40"
|
"size" : "40x40"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "Icon-App-40x40@3x.png",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"scale" : "3x",
|
"scale" : "3x",
|
||||||
"size" : "40x40"
|
"size" : "40x40"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "Icon-App-60x60@2x.png",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"scale" : "2x",
|
"scale" : "2x",
|
||||||
"size" : "60x60"
|
"size" : "60x60"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "Icon-App-60x60@3x.png",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"scale" : "3x",
|
"scale" : "3x",
|
||||||
"size" : "60x60"
|
"size" : "60x60"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "Icon-App-20x20@1x.png",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"scale" : "1x",
|
"scale" : "1x",
|
||||||
"size" : "20x20"
|
"size" : "20x20"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "Icon-App-40x40@1x.png",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"scale" : "2x",
|
"scale" : "2x",
|
||||||
"size" : "20x20"
|
"size" : "20x20"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "Icon-App-29x29@1x.png",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"scale" : "1x",
|
"scale" : "1x",
|
||||||
"size" : "29x29"
|
"size" : "29x29"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "Icon-App-29x29@2x-1.png",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"scale" : "2x",
|
"scale" : "2x",
|
||||||
"size" : "29x29"
|
"size" : "29x29"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "Icon-App-40x40@1x-1.png",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"scale" : "1x",
|
"scale" : "1x",
|
||||||
"size" : "40x40"
|
"size" : "40x40"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "Icon-App-40x40@2x-1.png",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"scale" : "2x",
|
"scale" : "2x",
|
||||||
"size" : "40x40"
|
"size" : "40x40"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "Icon-App-76x76@1x.png",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"scale" : "1x",
|
"scale" : "1x",
|
||||||
"size" : "76x76"
|
"size" : "76x76"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "Icon-App-76x76@2x.png",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"scale" : "2x",
|
"scale" : "2x",
|
||||||
"size" : "76x76"
|
"size" : "76x76"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "Icon-App-83.5x83.5@2x.png",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"scale" : "2x",
|
"scale" : "2x",
|
||||||
"size" : "83.5x83.5"
|
"size" : "83.5x83.5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "Qrious.png",
|
||||||
"idiom" : "ios-marketing",
|
"idiom" : "ios-marketing",
|
||||||
"scale" : "1x",
|
"scale" : "1x",
|
||||||
"size" : "1024x1024"
|
"size" : "1024x1024"
|
||||||
|
|
After Width: | Height: | Size: 559 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 881 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 21 KiB |
|
@ -81,6 +81,25 @@ extension UIApplication {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct ClearButton: ViewModifier
|
||||||
|
{
|
||||||
|
@Binding var text: String
|
||||||
|
public func body(content: Content) -> some View{
|
||||||
|
ZStack(alignment: .trailing){
|
||||||
|
content
|
||||||
|
if !text.isEmpty{
|
||||||
|
Button(action:{
|
||||||
|
self.text = ""
|
||||||
|
}){
|
||||||
|
Image(systemName: "delete.left")
|
||||||
|
.foregroundColor(Color(UIColor.opaqueSeparator))
|
||||||
|
}
|
||||||
|
.padding(.trailing, 8)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class configuration: ObservableObject {
|
class configuration: ObservableObject {
|
||||||
@Published var question: String = "Results show what are the compounds?"
|
@Published var question: String = "Results show what are the compounds?"
|
||||||
}
|
}
|
||||||
|
@ -114,7 +133,7 @@ struct ContentView: View {
|
||||||
Form{
|
Form{
|
||||||
|
|
||||||
Section(header: Text("Search Query")){
|
Section(header: Text("Search Query")){
|
||||||
TextField("Search Query",text: $query)
|
TextField("Search Query",text: $query).modifier(ClearButton(text: $query))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -123,6 +142,7 @@ struct ContentView: View {
|
||||||
HStack{
|
HStack{
|
||||||
Text("No. Of Articles:")
|
Text("No. Of Articles:")
|
||||||
TextField("No. Of Articles", text: $noOfArticles)
|
TextField("No. Of Articles", text: $noOfArticles)
|
||||||
|
.modifier(ClearButton(text: $noOfArticles))
|
||||||
.keyboardType(.numberPad)
|
.keyboardType(.numberPad)
|
||||||
}.disabled(!advance)
|
}.disabled(!advance)
|
||||||
HStack{
|
HStack{
|
||||||
|
@ -134,7 +154,7 @@ struct ContentView: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
Section(header: Text("Query for AI Model")){
|
Section(header: Text("Query for AI Model")){
|
||||||
TextField("",text: $ques, onEditingChanged: {_ in self.config.question = self.ques})
|
TextField("",text: $ques, onEditingChanged: {_ in self.config.question = self.ques}).modifier(ClearButton(text: $ques))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ struct DetailedView: View {
|
||||||
self.description1 = decodedData["description"].string!
|
self.description1 = decodedData["description"].string!
|
||||||
self.paperURL = decodedData["figshare_url"].string!
|
self.paperURL = decodedData["figshare_url"].string!
|
||||||
print("Finding Answer")
|
print("Finding Answer")
|
||||||
self.candidates = String(BERT().findAnswer(for: configuration().question, in: self.description1))
|
self.candidates = String(BERT().findAnswer(for: self.config.question, in: self.description1))
|
||||||
//return decodedData
|
//return decodedData
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|