karubiniumu commited on
Commit
f76298b
·
verified ·
1 Parent(s): ea0fa75

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -9
app.py CHANGED
@@ -1,14 +1,11 @@
1
  import gradio as gr
2
- import os
3
- from haystack.components.generators import HuggingFaceAPIGenerator
4
- from haystack_integrations.components.generators.google_ai import GoogleAIGeminiGenerator
5
 
6
- print('generator generate')
7
 
8
- gemini = GoogleAIGeminiGenerator(model="gemini-pro")
 
9
 
10
- print('generator generated')
11
 
12
- res = gemini.run(parts = ["What is the most interesting thing you know?"])
13
- for answer in res["replies"]:
14
- print(answer)
 
 
1
  import gradio as gr
 
 
 
2
 
 
3
 
4
+ def greet(name):
5
+ return "Hello " + name + "!"
6
 
 
7
 
8
+ demo = gr.Interface(fn=greet, inputs="textbox", outputs="textbox")
9
+
10
+ if __name__ == "__main__":
11
+ demo.launch()