Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -14,11 +14,13 @@ def request_url(url):
|
|
14 |
except requests.RequestException:
|
15 |
return None
|
16 |
|
|
|
17 |
def greet(name):
|
18 |
url = f'https://huggingface.co/spaces?p=1&sort=modified&search=GPT'
|
19 |
html = request_url(url)
|
|
|
20 |
|
21 |
-
return "Hello " +
|
22 |
|
23 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
24 |
iface.launch()
|
|
|
14 |
except requests.RequestException:
|
15 |
return None
|
16 |
|
17 |
+
import os
|
18 |
def greet(name):
|
19 |
url = f'https://huggingface.co/spaces?p=1&sort=modified&search=GPT'
|
20 |
html = request_url(url)
|
21 |
+
key = os.getenv("OPENAI_API_KEY")
|
22 |
|
23 |
+
return "Hello " + key + "!!"
|
24 |
|
25 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
26 |
iface.launch()
|