Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -109,5 +109,17 @@ if index is None:
|
|
109 |
st.warning("Please enter your api key first.")
|
110 |
|
111 |
|
112 |
-
|
113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
st.warning("Please enter your api key first.")
|
110 |
|
111 |
|
112 |
+
|
113 |
+
gradio_interface = gradio.Interface(
|
114 |
+
fn=greet,
|
115 |
+
inputs="text",
|
116 |
+
outputs="text",
|
117 |
+
examples=[
|
118 |
+
["What is the track width of the P30 (b11 mm)?"],
|
119 |
+
["What is the acceleration of the P30 (km/h)?"]
|
120 |
+
],
|
121 |
+
title="REST API with Gradio and Huggingface Spaces",
|
122 |
+
description="This is a demo of how to build an AI powered REST API with Gradio and Huggingface Spaces – for free! Based on [this article](https://www.tomsoderlund.com/ai/building-ai-powered-rest-api). See the **Use via API** link at the bottom of this page.",
|
123 |
+
article="© Tom Söderlund 2022"
|
124 |
+
)
|
125 |
+
gradio_interface.launch()
|